getErrorString( ) method
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns any before-image error string in the data of a record object referenced in JSDO memory that was set as the result of a resource Create, Update, Delete, or Submit operation.
If there is no error string in the data of the specified record object, this
method returns undefined.
ERROR
and ERROR-STRING attributes on a buffer object handle set
to the corresponding record in the corresponding ABL temp-table. For more information on
these attributes, see OpenEdge Development: ABL Reference and
OpenEdge Development: ProDataSets.The specified record object can be either the working record of 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 error string returned by this function contains error information only
for a Data Object Service operation on a resource that supports before-imaging. This
information can only be returned for a resource Create, Update, Delete, or Submit operation
(saveChanges(true)) that affects the before-image data of
a resource record. The JSDO stores the error information from each affected resource record
in the corresponding JSDO record object as an internal property of its data with a reserved
name.
autoApplyChanges property is false. When
autoApplyChanges is true, the method automatically accepts or rejects record changes, and clears all
associated error conditions and information after the final after* event is fired and handled (if handled) for a given operation.See also:
addRecords( ) method, afterCreate event, afterDelete event, afterUpdate event, autoApplyChanges property, find( ) method, findById( ) method, foreach( ) method, saveChanges( ) method, record property