Sometimes a new feature is released in Dynamics 365 with little or no fanfare. It could be something very small and it just slips under the radar. Sometimes when I stumble across these new features I start to doubt myself, and wonder if it's been there all along. I often have to check back on older versions of CRM to reassure myself I'm not mistaken, and that it is indeed a new feature.
This happened recently when I realized you can now sort a view by a parent entity column.
You've always been able to add parent entity attributes to views. For example, below I've added the parent account's 'Address 1: City' field to a view of contacts. It adds the familiar bracketed name of the relationship after the attribute name, in this case '(Company Name)':
As you most likely know, when you click on the column header, the view sorts by that column. In previous versions of CRM, up to 2016, if you clicked on the header of a column from a parent entity, nothing happened. However, in Dynamics 365 v8.2 and later it sorts the data on that column just like any other column.
This works for both system views and personal views.
It also works for read only grid and editable grid.
And it also works for both primary and secondary sort, i.e. if you sort the view by 2 columns, you can make the parent entity column either the primary sort order or the secondary sort order by holding down the shift key when sorting.
There are a couple of limitations.
Firstly, there is still the limitation that you can’t sort the view by a parent entity column by default, since when you configure the view you're still only given the columns from the primary entity to sort by.
Secondly, and rather surprisingly, this doesn't work in the Unified Client.
Let's hope Microsoft fix both these limitations in a future release.
Happy CRMing everyone.