Friday 12 May 2017

Dynamics 365 – Apply sorting on Composite Columns

Those working on CRM views might have often felt the need to be able to sort on composite columns (e.g. address).

As we see in the below screen print. The available columns for sorting do not contain composite field Address even when Address is a part of the view.

OOB CRM does not allow this. Here, I am sharing a simple solution for sorting on composite columns.

Note the name of the view in concern.

Create a solution with that view as a component and export it.
Extract the exported zip file.
Open customizations.xml and locate your view.

You will see that the address column has an attribute ‘disableSorting=”1”’ as shown in the below screenshot. Delete that attribute from the cell.

Compress the files back and rename the zip file to the name of the solution.

Import the solution back to CRM. Do not forget to publish the solution.
That’s it. Now, if you check your view, you will be able to sort on Address filed also.

You can also use the same approach if you are unable to sort on fields picked up from related entities.

Hope it helps!

A simple and quick way to insert data into Many-to-Many relationship in Dynamics CRM is the Drag and drop listbox.