Hello,
I have a list page which is using an AOT Query as a Datasource. The query has sorting on StartDate 'Ascending' order.
This list page is being used at multiple places by different menu items.
In the List Page Interaction class, I have a code in initializedQuery method where for a particular menu item, I am setting the order of Startdate to Descending Order as shown below.
qbds.addOrderByField(fieldNum(MyTable, StartDate), SortOrder::Descending);
but it seems, AX is giving precedence to the AOT Query sort order instead of this code.
To solve this issue, I can remove the sort order of the AOT Query and use above code for every possible menu item where i need it in Descending order.
Is there any other solution than this?