Quantcast
Viewing all articles
Browse latest Browse all 10657

dynamics ax 2012 form datasource sort X++

Today I got requirement to insert record at run time and shows result in sorted order. I used following code code snippets. Suppose we are sorting on Customer
in required field

CusTable_ds.query().dataSourceNo(1).sortClear();

CusTable_ds.query().dataSourceNo(1).addSortField(fieldNum(CustTable, AccountNum), SortOrder::Ascending);
CusTable_ds.executeQuery();

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 10657

Trending Articles