JavaScript
listObj.addTableRowsBulk Method
Syntax
listObj.addTableRowsBulk(dataArray)
Arguments
- dataArrayJSON Array
A JSON array with values for the fields in the List you want to set.
Description
Adds multiple rows to a List control.
Discussion
The addTableRowsBulk() method allows you to add an array of new rows to the List.
When you use the addTableRowsBulk() method, it is as if the user has entered each new row into the List using the List's Detail View.
Contrast with the appendRows() method. If you use this method to add a row to the List with a Detail View, the List's Sync button will not synchronize the rows that were added.
Example:
Example
var listObj = {dialog.object}.getControl('LIST1'); if (listObj) { // Define two new rows to add to LIST1: var dataArray = [ { FIRSTNAME: 'Cecelia', LASTNAME: 'DeLuca'}, { FIRSTNAME: 'Cathy', LASTNAME: 'Marsh'} ] listObj.addTableRowsBulk(dataArray); }
Using the addTableRowsBulk() method is faster than calling the addTableRow() method in a loop.