Child pages
  • ViewRecord
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Refresh page Apr 29, 2024 12:44

Supported Clients
SmartClient WebClient NGClient

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.
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 isNew()
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).

Returns

Exception The occurred exception.

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

foundset

Returns parent foundset of the record.

Returns

JSFoundSet The parent foundset of the record.

Supported Clients

SmartClient,WebClient,NGClient

Sample

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 foundset.getEditedRecords().

Returns

JSDataSet a JSDataSet with the changed data of this record.

Supported Clients

SmartClient,WebClient,NGClient

Sample

/** @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));
}

getPKs()

Returns an array with the primary key values of the record.

Returns

Array an Array with the pk values.

Supported Clients

SmartClient,WebClient,NGClient

Sample

var pks = foundset.getSelectedRecord().getPKs() // also foundset.getRecord can be used

hasChangedData()

Returns true if the current record has outstanding/changed data.

Returns

Boolean true if the current record has outstanding/changed data.

Supported Clients

SmartClient,WebClient,NGClient

Sample

var hasChanged = record.hasChangedData();

isNew()

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

 

revertChanges()

Reverts the in memory outstanding (not saved) changes of the record.

Supported Clients

SmartClient,WebClient,NGClient

Sample

var record= foundset.getSelectedRecord();
record.revertChanges();

  • No labels