Get selected records from grid || AX2012
If you want to get all marked records from a formdatasource the following code will be usefull: SalesTable salesTable; for (salesTable= getFirstSelection(SalesTable_DS);salesTable;salesTable=SalesTable_DS.getNext()) { if (salesTable.SalesId) { info (salesTable.SalesId); } }