Views within Microsoft Dynamics CRM 2011, by default, support up to two pre-defined sortable columns, which are selected when the view is defined.
However, it is possible to manually sort any View on multiple columns using a combination of your mouse and keyboard.
Let’s walk through the process:
Here is a view of some Contact sample data which has been sorted by the Contact’s full name.
We would like to re-sort this View by address information.
Step 1: Click Address 1: State/Province
The view will be sorted by the State/Province:
Also notice that the background color of the column is now grey and an arrow has been placed on the right-side of the column header.
A arrow pointing up indicates that the column is sorted in Ascending order, an arrow pointing down indicates that the column is sorted in Descending order.
Note: If the full text of the column header is not displayed, then the arrow will not be displayed either. You must expand the width of the column to show both.
Step 2: Hold down the Shift Key, then click City
Again we have an arrow on the right-side of the column header and column shading to indicate this is a sort column.
Step 3: Hold down the Shift Key, then Click ZIP/Postal Code
Will result in all three columns being sorted:
Sorting in Descending Order
If you wish to sort a column in Descending order, just perform the shift-click on that column and you will see the results resorted, like this:
- The order that you choose your columns is important with the first selected column controlling any additional sub-sorts – so make sure you start with the most important column first.
- The selected sort order will disappear and be replaced with the default sort order as defined by the View definition, should you leave the View.
- I don’t actually know the maximum number of sort columns because, quite frankly, I ran out of columns during my tests. But, it is at least 7.