NSOA.form.getOldRecord()
Use this function to get the entity record for a form with the current (not yet saved) values, for example oaProject.
See also NSOA.form.getNewRecord().
Tip:
An Entrance Function can optionally receive a type string parameter. Check if the value of this parameter is ‘update’ to determine if the form is being modified.
Parameters
-
(none)
Returns
-
OpenAir Complex Type object, see NSOA.record.<complex type>( [id] ).
Note:
This function will return null if called for a form that is being created.
Units Limit
-
1 unit
For more information, see Scripting Governance.
Since
-
November 16, 2013
Example
-
This example checks to see if the project name has been modified.
var oldr = NSOA.form.getOldRecord(); var newr = NSOA.form.getNewRecord(); if (oldr.name !== newr.name) NSOA.meta.alert("Project name changed to: " + newr.name);
Note:This simple example does not show error checking, see Handling SOAP Errors.
See Code Samples for more examples.