Hi
Using Dynamic 365 online. I am trying to create a custom view that will display accounts in the order they are searched for but cant get it to work.
For instance
AccountName = Microsoft
OR
AccountName = IBM
OR
AccountName = Hewlett Packard
Returns in that order
Microsoft
IBM
Hewlett Packard
I tried just removing the <order attribute = “Name”.. hoping this would return the records in the order of the query but it seems to return records by ‘Record created date’ instead. Is there anyway to get the records returned in the order as the query states. Searched a number of websites but haven’t found an answer.
Would appreciate any advice.
*This post is locked for comments
Hi,
By default, It supports only two columns. You can also check this article to customize sorting priority.
www.powerobjects.com/.../customize-sorting-priority-in-views-in-crm-2011
Hi Trevor,
Click on Edit columns in the Advanced Find command bar as shown below.
Click on Configure Sorting.
Here you can give the sorting order in the descending order of name.
Hope this helps.
Hi Goutam
Thanks for your reply
Advanced find screenshot below
I didn’t set any sorting for this however when I examined the fetchxml its seem that it sets a default order <order attribute="name" descending="false" />
Below is the full query. Using the FetchXML builber in XRMToolbox I removed the order attribute hoping this would return the records in the same order as the query.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" >
<entity name="account" >
<attribute name="name" />
<attribute name="primarycontactid" />
<attribute name="telephone1" />
<attribute name="accountid" />
<order attribute="name" descending="false" />
<filter type="and" >
<filter type="or" >
<condition attribute="name" operator="eq" value="Microsoft" />
<condition attribute="name" operator="eq" value="IBM" />
<condition attribute="name" operator="eq" value="Hewlett Packard" />
<condition attribute="name" operator="eq" value="ABC Company" />
</filter>
</filter>
</entity>
</fetch></fetch>
When I run the query in CRM, it returns the accounts in the following order (get the same result when running from FetchXML builder)
I thought initially this order was related to ‘Record created date’ but it could be the auto generated AccountID as I am guessing these would be sequential identifiers which would return the same effect as by date. It dosnt matter what order I use in the advance find It still retruns the same result in the view.
I am just trying to return the records in the view window in the same order they are set out in the advanced find criteria but not sure if this is even possible.
Hope this all makes sense and again thanks for your reply and appreciate your help.
Hi Trevor,
Could you please share screenshot what you did for sorting .
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156