Page tree
Skip to end of metadata
Go to start of metadata

This API assigns JavaScript object property values based on declared field values.

Each property that has a matching declared field name is assigned the value of that field.

Parameters

  1. Primitive JavaScript object

Return Value

The modified object is returned by the API.

Example

// Retrieve data into a record object by querying a table using product id
var record = pjs.query("SELECT * FROM productsp WHERE prid = ?", prid, 1);

// Set matching global declared fields, including any screen fields
pjs.setFields(record);
 
// Display the screen
display.myform.execute();
 
// Retrieve user input back into the record object
pjs.getFields(record);  // can also be expressed as follows: record = pjs.getFields(record);