SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord SetName() Method
(SBM On-Premise/PaaS only) Sets the "name" value of the calling object.
Parameter | Type | Description |
---|---|---|
newName |
string |
Text to be used as the new name for the item. |
Type | Description |
---|---|
None |
SBM ModScript version: 11.3.
//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 ); }
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.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.