Each property that has a matching declared field name is assigned the value of that field.
The modified object is returned by the API.
// 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
// Display the screen
// Retrieve user input back into the record object
pjs.getFields(record); // can also be expressed as follows: record = pjs.getFields(record);