getId( ) method
- Last Updated: June 20, 2019
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
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
- A reference to a
JSRecordobject for a table record in JSDO memory.You can obtain a
JSRecordobject by:- Invoking a JSDO method that returns record objects from a JSDO
table reference (
find( ),findById( ), orforeach( )) - Accessing the
recordproperty on a JSDO table reference that already has a working record. - Accessing the record parameter
passed to the callback of a JSDO
afterCreate,afterDelete, orafterDeleteevent. - Accessing each record object provided by the
jsrecordsproperty on the request object parameter passed to the callback of a JSDOafterSaveChangesevent, or passed to the callback of any Promise object returned from thesaveChanges( )method. Thejsrecordsproperty 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.
- Invoking a JSDO method that returns record objects from a JSDO
table reference (
- 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 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.
fill( ) method.See also:
add( ) method, addRecords( ) method, fill( ) method, findById( ) method