Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > RunnerPage object > Methods

JavaScript API: RunnerPage object > getAllRecords()

Scroll Prev Next More

 

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

•Dialog API

•PDF API

•PDF Parameters

•Events: JavaScript onload

•Click actions

•AJAX-based functionality

•AJAX helper object

•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

•JavaScript API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software