JSDO properties, methods, and events reference : getId( ) method
  

getId( ) method

Returns the unique internal ID for the record object referenced in JSDO memory.
The specified record object can be either the working record for a referenced table, or any record provided by a JSRecord object.
Return type: string
Applies to: progress.data.JSRecord class, progress.data.JSDO class, table reference property (JSDO class)

Syntax

jsrecord-ref.getId ( )
jsdo-ref.getId ( )
jsdo-ref.table-ref.getId ( )
jsrecord-ref
A reference to a JSRecord object for a table record in JSDO memory.
You can obtain a JSRecord object by:
*Invoking a JSDO method that returns record objects from a JSDO table reference (find( ), findById( ), or foreach( ))
*Accessing the record property on a JSDO table reference that already has a working record.
*Accessing the record parameter passed to the callback of a JSDO afterCreate, afterDelete, or afterDelete event.
*Accessing each record object provided by the jsrecords property on the request object parameter passed to the callback of a JSDO afterSaveChanges event, or passed to the callback of any Promise object returned from the saveChanges( ) method. The jsrecords property is only available on completion of a Submit operation (saveChanges(true)) on a resource that supports before-imaging, and not if the resource supports before-imaging without Submit.
jsdo-ref
A reference to the JSDO. You can call the method on jsdo-ref if the JSDO has only a single table reference, and that table reference has a working record.
table-ref
A table reference on the JSDO that has a working record.
The internal record ID returned by this function is a unique value generated by the JSDO for each record object loaded into JSDO memory using the fill( ), add( ), or addRecords( ) methods. The JSDO adds this value to the data of each record object in a property with a reserved name. The JSDO uses this record ID in the progress.ui.UIHelper class, to map the record objects in JSDO memory to the HTML elements of mobile apps.
To return and set the specified record as the working record, you can pass any value returned by this method to the findById( ) method called on the associated table reference.
Note: The value assigned to the internal record ID for any given record object can change with each invocation of the fill( ) method.

See also:

add( ) method, addRecords( ) method, fill( ) method, findById( ) method