Record sorting D365FO, AX 7 and AX-2012
Today, I got requirement to perform sorting on form with table data source while inserting records..
SLDOffsetTaxDS_DS.query().dataSourceName(formDataSourceStr(SLDOffsetTax,SLDOffsetTaxDS)).addSortField(fieldNum(SLDOffsetTax,
Priority), SortOrder::Ascending);
SLDOffsetTaxDS_DS.query().dataSourceName(formDataSourceStr(SLDOffsetTax,SLDOffsetTaxDS)).addSortField(fieldNum(SLDOffsetTax,
CountryRegionId), SortOrder::Ascending);