Mar 29, 2024 12:24 Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Returns Supported Clients Sample Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
MobileClient
Property Summary
Exception
exception
Returns last occurred exception on this record (or null).
JSFoundSet
foundset
Returns parent foundset of the record.
Methods Summary
JSDataSet
getChangedData()
Returns a JSDataSet with outstanding (not saved) changed data of this record.
String
getDataSource()
Returns the records datasource string.
Array
getPKs()
Returns an array with the primary key values of the record.
Boolean
hasChangedData()
Returns true if the current record has outstanding/changed data.
Boolean
isEditing()
Returns true or false if the record is being edited or not.
Boolean
isNew()
Returns true if the current record is a new record or false otherwise.
Boolean
isRelatedFoundSetLoaded(relationName)
Returns true or false if the related foundset is already loaded.
void
revertChanges()
Reverts the in memory outstanding (not saved) changes of the record.
Property Details
exception
Returns last occurred exception on this record (or null).
var exception = record.exception;
foundset
Returns parent foundset of the record.
var parent = record.foundset;
Methods Details
getChangedData()
Returns a JSDataSet with outstanding (not saved) changed data of this record.
column1 is the column name, colum2 is the old data and column3 is the new data.
NOTE: To return an array of records with outstanding changed data, see the function databaseManager.getEditedRecords().
/** @type {JSDataSet} */
var dataset = record.getChangedData()
for( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )
{
application.output(dataset.getValue(i,1) +' '+ dataset.getValue(i,2) +' '+ dataset.getValue(i,3));
}
getDataSource()
Returns the records datasource string.
var ds = record.getDataSource();
getPKs()
Returns an array with the primary key values of the record.
var pks = foundset.getSelectedRecord().getPKs() // also foundset.getRecord can be used
hasChangedData()
Returns true if the current record has outstanding/changed data.
var hasChanged = record.hasChangedData();
isEditing()
Returns true or false if the record is being edited or not.
This will not check if the record doesn't really have any changes, it just returns the edit state.
So this can return true but databaseManager.getEditedRecord() will not return this record because that
call will check if the record has really any changed values compared to the stored database values.
var isEditing = foundset.getSelectedRecord().isEditing() // also foundset.getRecord can be used
isNew()
Returns true if the current record is a new record or false otherwise.
var isNew = foundset.getSelectedRecord().isNew();
isRelatedFoundSetLoaded(relationName)
Returns true or false if the related foundset is already loaded. Will not load the related foundset.
String
relationName
name of the relation to check for
var isLoaded = foundset.getSelectedRecord().isRelatedFoundSetLoaded(relationName)
revertChanges()
Reverts the in memory outstanding (not saved) changes of the record.
var record= foundset.getSelectedRecord();
record.revertChanges();