Returns an array of GridRow objects for all the records in the data grid on the List page.
Syntax
getAllRecords();
Arguments
No arguments
Return value
Returns an array of GridRow objects for all the records in the data grid on the List page.
Example
Let's say you use a Spreadsheet mode and need to make certain columns readonly based on some condition. This example shows how to do it. This code goes to the List page: Javascript OnLoad event. We are checking the value of status field and if it equals 'paid' then we make fields quantity and price readonly.
var records = pageObj.getAllRecords();
records.forEach( function( row, idx ) {
if (row.getFieldValue("status") 'paid' ) {
var ctrl1 = Runner.getControl(row.recordId(), 'quantity');
ctrl1.makeReadonly();
var ctrl2 = Runner.getControl(row.recordId(), 'price');
ctrl2.makeReadonly();
}
});
See also:
•AJAX helper object: ajax.addPDF
•JavaScript API: RunnerPage object > getSelectedRecords()
•JavaScript API: RunnerPage object > getSelectedRecordKeys()
•Show order total on the Edit page as the details table is updated
•JavaScript API: RunnerPage object