This API sets field values using the properties of a JavaScript object.

Each object property that has a matching declared field is used to set the field value.

Parameters


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
record = pjs.getFields(record);

Video Tutorial

<div align="center" style="position:relative;height:360;width:640"><iframe width="640" height="360" src="https://www.youtube.com/embed/cyBz6QXm08A" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe></div>