Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of the Object class.
Syntax
public void new(TableId tableId, [Common table])
Run On
Called
Parameters
- tableId
Type: TableId Extended Data Type
The ID of the table that the list will hold.
- table
Type: Common Table
Remarks
The list can contain records of the type that is specified by the tableId parameter.
Examples
The following example uses a RecordInsertList object to insert three records in a single database operation.
{
RecordSortedList recordSortedList;
CustTable custTable;
recordSortedList = new RecordSortedList(tablenum(CustTable));
recordSortedList.sortOrder(fieldnum(custTable,AccountNum));
ttsbegin;
// Prepare record #1 for insertion.
custTable.AccountNum = '1000';
custTable.CreditMax = 10000.0;
recordSortedList.ins(custTable);
// Prepare record #2 for insertion.
custTable.AccountNum = '2000';
custTable.CreditMax = 500.0;
recordSortedList.ins(custTable);
// Prepare record #3 for insertion.
custTable.AccountNum = '3000';
custTable.CreditMax = 9999999.9;
recordSortedList.ins(custTable);
// All 3 records inserted in one database operation.
recordSortedList.insertDatabase();
ttscommit;
}