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

Announcements

News and Announcements icon
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,985 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
KristineRisberg Profile Picture

KristineRisberg 37

#2
11manish Profile Picture

11manish 33

#3
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 21 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans