AppRecord Read() Method

Looks up a row in the AppRecord's table.

Function Signature

 bool Read( recordIdOrName )

Parameters

Parameter Type Description

recordIdOrName

string

int

If this is an int or string that SBM ModScript can convert to an int, it is taken as the value to search for in the TS_ID column. All other parameter types are converted to a string and searched for in the Name system field.

Return

Type Description

bool

Returns true if the TS_ID or name was found, in which case the calling AppRecord object becomes a copy of that row in the table.

Technical Details

SBM ModScript version: 11.3.

Example

//Create a Contact record
var tableId = Ext.TableId ("TS_CONTACTS");
var myRecord = Ext.CreateAppRecord(tableId);
if(! myRecord.Read("Smith")) { 
	Ext.LogErrorMsg("Error looking for Contact with " +
	"TS_CONTACTLASTNAME of 'Smith'");
}

Notes

If the table is cached by Application Engine, the record may be read from the cache instead of the database.

Related Topics

AppRecord