Sort on Related Column in a View | CloudFronts

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.

 

Conclusion: The View My active accounts will be by default sorted by email address in ascending order.


Share Story :

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close