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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Sort related fields in view using fetchxml

(0) ShareShare
ReportReport
Posted on by 5

Hi Expert,

I have a requirements to sort two field in Dynamics 365 view. "prioritycode" field is a related field and "enteredon" field in the main entity. 

Below is the previous design. 

pastedimage1640200991914v1.png

Since the field is in the different entity now. I used xrmtoolbox to update the code in my view for sorting. 

pastedimage1640201312369v2.png

The fetchxml code did work, it sort it, except that its sorting first the "enteredon" and not the "prioritycode". 

pastedimage1640201565784v3.png

How can I sort this to be like SORT BY: "prioritycode" THEN BY: "enteredon"? Will sort it out first the prioritycode then the enteredon. 

Thank you so much in ADVANCE!!! Happy Holiday!!!

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Can you not create Calculated field to copy value from ParentCase to main entity and use this field for ordering.

    You can also create Business Rule to Copy value from Parent Case to Main entity.

    The advantage is you will have control on the Order sequence.

    Fetchxml  main entity Order attribute will be executed first then Link entity order expression.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans