web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Sorting issue - How to show the newly created Project on the top of the All projects list form

(0) ShareShare
ReportReport
Posted on by

I added a new field - creation date on Project Management and Accounting > Common >Projects > All Projects list. I like the list is displayed in descending order of creation date by default. Basically I like to see the newest project  on the top of the list. Currently the default is ascending order so the newest project is on the bottom of the list.

I added following code in openProjectsListPage method which is in projProjectListPage class

QueryBuildDataSource qbds;
qbds.addSortField(fieldNum(ProjTable,Created),SortOrder::Descending);

It didn't work. Does anybody know how to do it.  

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    This is due to the Primary Index on the table..

    may be you should consider updating ProjTable Index and add the new field (Created) in it for your requirment

    Please verify and update us with your findings

  • Verified answer
    Martin Dráb Profile Picture
    237,884 Most Valuable Professional on at

    The list page is based on ProjTable_NoFilter query, which defines the following sorting under Order By node: ProjId (ascending), Name (ascending). You can remove these sort fields, add you own and/or change Direction property of a sort field to Descending.

  • Suggested answer
    dolee Profile Picture
    11,279 on at

    The Project list page is based on the ProjTable_NoFilter query.

    The query by default is sort by ProjTable.ProjId (asc) and ProjTable.Name (asc). Edit the "Order By" setup of this query should get you what you want.

    In addition, even if changing index was a solution, I'd suggest think twice before doing so because modifying indexes could potentially affect other queries.

  • Community Member Profile Picture
    on at

    Thanks Dominic. It worked after I changed Order By on the ProjTable_NoFilter query.

  • Community Member Profile Picture
    on at

    Thanks to Martin too!

  • Community Member Profile Picture
    on at

    Thanks for your responding. For the safe reason, I only changed order by on the ProjTable_NoFilter query. It works!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans