JSDO properties, methods, and events reference : jsrecords property
  

jsrecords property

An array of references to record objects that are created, updated, or deleted on the server for a Submit operation (invoking saveChanges(true)) on a Data Object resource that supports before-imaging.
Data type: Array of progress.data.JSRecord class
Access: Read-only
Applies to: request object
For a before-image resource, such as an OpenEdge ProDataSet resource, if the record change on a given JSRecord object referenced in this array has executed with an error, the data property object of this record object contains a property named "prods:rowState" that has one of the following string values indicating the type of record change that was applied to the record:
*"created"
*"modified"
*"deleted"
To access this property (with a special character (:) in its name), you must reference it as an index reference on the data property object, as in this example, where request is the request object returned from the Submit operation:
for (var i = 0;i < request.jsrecords.length;i++) {
    var jsrecord = request.jsrecords[i];
    var jsrecError = jsrecord.getErrorString();
    if (jsrecError) {
        /* handle record-change error */
        console.log("Record change: "
                    + jsrecord.data["prods:rowState"]);
        console.log("Error: " + jsrecError);
    }
}
Note: The "prods:rowState" property is always available in this data property object only if the JSDO autoApplyChanges property is false when you invoke saveChanges(true).
The jsrecords property is available only for the following JSDO events or in the request object returned to a jQuery Promise callback, and only after invoking saveChanges(true) on the JSDO:
*afterSaveChanges
*beforeSaveChanges
This request object property is also available for any session online and offline events that are fired in response to the associated resource operation when it encounters a change in the online status of the JSDO login session (JSDOSession or Session object). The request object is itself passed as a parameter to any event handler functions that you subscribe both to JSDO events and to the online and offline events of the session that manages Data Object Services for the JSDO.

See also:

saveChanges( ) method