Skip to main content

Posts

Showing posts from January, 2020

Sort on Related Column in a View

Introduction:


When we create a view, We can configure the sort but the sorting is available only for the columns which are a part of the entity on which the view is created. Eg: In the active accounts view, there is a column " Email" which is a field from Contact Entity. If we see the columns available for sorting we cannot see Email. However, in case you want to sort on a column from the related entity we can do it using the view designer and Fetch Xml builder tools from the XRM Toolbox.

Solution: On load of My active accounts, the default sort is on Account Name
Open View Designer on XRM Toolbox
Click on Edit Query to open Fetch XML Builder
We can see the order attribute is on name Now, we can edit and add order attribute to emailaddress1 After you click on Return FetchXML, you will return back to view designer. Then click on edit XML and remove the disable sorting on the attribute.
You can now save and Publish.
 The View My active accounts will be by default sorted by email address i…