SBM AppScript Reference → Programming SBM AppScript → Extension Functions → Ext.CreateAppRecord( tableId [, recType] )
This function is intended for tables that are not Primary or Auxiliary and do not correspond to AppRecord subtypes supported by the built-in CreateObject() function. Creates a new AppRecord object of a subtype appropriate for the database table given by the number tableId. When called on a Primary table, the new object is a ProjectBasedRecord internally, though only the base-type AppRecord functionality is available. When called on an Auxiliary table, a VarRecord is created but again is returned as the AppRecord base type. For other tables, an AppRecord subtype is created if one exists in SBM AppScript (for example, a Change object for the TS_CHANGES table). Otherwise, a generic AppRecord object is created.
recType
Pass this optional numeric argument when creating field objects. It specifies the data type to be stored in the field. Do not pass this argument for tables other than TS_FIELDS.
tableId
Pass this argument to create a new AppRecord object of a subtype appropriate for the database table given by the number tableId.
The newly-created AppRecord object.
Copyright © 2007–2015 Serena Software, Inc. All rights reserved.