SBM ModScript Reference → Programming SBM ModScript → Object Types → AppRecord → AppRecord Add() Method
(SBM On-Premise/PaaS only) Adds a new row to a table.
Parameter | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
int |
The TS_ID of the record added, which is unique to this table. Zero means the record could not be added due to an error. |
SBM ModScript version: 11.3.
var tableId = Ext.TableId("TS_CONTACTS"); var myRecord = Ext.CreateAppRecord(tableId); var myRecord.SetFieldValue("CONTACTLASTNAME", "Smith"); var ret = myRecord.Add(); if (ret == 0){ Ext.LogErrorMsg("Error adding Contact."); }
After creating an AppRecord from the desired table and setting any desired field values, use this method to add the record as a new row in its table. This is not for use with Primary tables, because those items must go through a Submit transition. However, it is possible to make a copy of a Primary table item using this method.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.