Dynamics 365 hide the field that is used to sort a view

Sorting Dynamics 365 views, you can only sort the field that is selected in the column for the view. You can’t able to select a field for sorting which is not part of the selected attribute to be viewed. But there are occasions where you still need to sort but don’t need to show the field that is used to sorting in the view.

The scenario is, in a lookup view, you need to sort the records based on a custom sequence number that is part of the reference data.

Reference table with sequence to sort

The problem here is, if you only add the sequence number field to the view, then only you can sort using that field. From a usability stand point of view, the sequence number that shows in the lookup dropdown makes the dropdown more clumsy and also it occupies more real-estate thus prevents in viewing more values in the lookup.

Lookup with clumsy data

The solution to this problem is, you add that field in the view and configure the sorting based on the field i.e. Sequence in the customization. Then comes the trick that will help make that unnecessary column to hide. Use the plugin called View Designer in the XRM Toolbox.

View Designer plugin

Open the plugin in the XrmToolbox, click on the Open button, this will list all the entities in the dropdown as shown below. Choose the entity in the entity dropdown, then pick the view that you need to customize in the view dropdown.

View Designer Plugin

Click Ok to open the view customizer. Click on the “Select Columns” option, this will open the column list as below. In that list, uncheck the column that you need to hide. Click OK.

Save the changes, then click Publish to publish the change that you just made. Now look at the change that it made in the lookup. The sorting’s are intact and the column is also hidden from the lookup view.

Lookup view that looks awesome




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s