AppRecord SetName() Method

(SBM On-Premise/PaaS only) Sets the "name" value of the calling object.

Function Signature

 void SetName( newName )

Parameters

Parameter Type Description

newName

string

Text to be used as the new name for the item.

Return

Type Description

None

Technical Details

SBM ModScript version: 11.3.

Example

//Create a Company record
var myRecord = Ext.CreateAppRecord( Ext.TableId ( "TS_COMPANIES" ));
var whereClause = "TS_NAME = 'ABC'"
var bOk = myRecord.ReadWithWhere( whereClause );
if( bOk ) { 
	//Set the name of the company to "XYZ"
	myRecord.SetName("XYZ");
	//Commit change to database
	 myRecord.UpdateWithLock( true );
}

Notes

This method sets the "name" value of the calling object. For system tables, this is the "TS_NAME" column. For primary and auxiliary tables, this is the column that corresponds to the "name" system field. For more details on the "name" system field, refer to Working with SBM Database Records.

Related Topics

AppRecord