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 :
Finance | Project Operations, Human Resources, ...
Answered

The specified sequence of Group By and Order By fields is not supported.

(0) ShareShare
ReportReport
Posted on by 135
When I debugged code the error is due to AddGroupByField() on query build data-source: qbds.addGroupByField(FieldId)
I have the same question (0)
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Before other development-savvy experts have any thoughts on this, based on the error message, you can check out this link:https://robscode.onl/d365-the-menu-item-with-name-could-not-be-opened/  And check if the fields support grouping and ordering, ensure that the field types used are compatible, and check if the order of grouping and ordering fields is correct.
    Best Regards,
    Hana
  • itlabnarmi_ivoruk Profile Picture
    135 on at
     
    this is not the same case with me, my issue is due to AddGroupByField() method on data-source. 
  • Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi,
     
    Can you show us your full code? Where did you use orderBy?
  • Suggested answer
    MuthukumaranAX Profile Picture
    2,903 on at
    is this called from a form datasource or are you constructing the query via code? 
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
     
    It seems you're trying to do order by using group by field. You can't order by Aggregate group by, can you share your code in order to help you better?
     
    Thanks
    Waed Ayyad
     
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
     
  • Verified answer
    itlabnarmi_ivoruk Profile Picture
    135 on at
    Thank you guys for your valuable responses, In my case it was some data issue due to which it was throwing this error.
     
    Also I find this below line of code that it might be helpful if there is some sort of issue in group by on query through X++ code:
  • Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    Thanks for coming back and clarifying this issue, it will help others on the forum with the same problem.
    Best Regards,
    Hana

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans