Skip to main content

var payableModel = skuid.model.getModel(‘Accounts_Payable’);
    var modelRows = payableModel.getRows();
    var selectedItems = modelRows.getField(“id”);

I would like “selectedItems” to contain all of the record IDs from the “Accounts_Payable” model.  Thanks in advance for any help!

Hi Danny, You can use: Object.keys(payableModel.dataMap); Thanks. Gyan


Thanks, Gyan.  That did the trick.


Since dataMap is an internal cache, I would recommend using the following, which uses supported API methods:


var allRowIds = payableModel.getRows().map(function(row) {<br>&nbsp; &nbsp;return payableModel.getRowId(row);<br>});