Adding and Customizing Subgrid Search Box in Dynamics 365

Leave a comment

In Dynamics 365, we can add subgrids to forms. We can also add a search box to the subgrid, allowing users to search for particular data within the subgrid records. In this post we will go through setting up this search box and configuring which fields are searchable.

On the account form, we have a subgrid that displays contacts related to the account:

On editing the form, we can see the subgrid is using the Active Contacts Subgrid View as the data source, with the Display Search Box and Display Index unchecked:

We will check the Display Search Box. Note the Display Index is only supported on Classic forms, which allows you to jump to a letter or number:

Now when we refresh our form, we can see the Search Box:

Let’s customize the view behind this to display additional fields. The view is called Active Contacts Subgrid View, from the above configuration.

Go to the Contact entity, select Views and select the view:

Add Columns:

We will add Job Title and City:

Refresh the page to display more fields:

Now, let’s search for Seattle, which is the city for these 2 records. You can see, nothing is returned, i.e. the search is not finding the 2 records:

This is because the City field has not been configured for search. On the Contact entity, go to Quick Find Active Contacts:

Click on Add Find Columns:

Add Address 1: City to the list and click OK:

Now search for Seattle. The results will be returned:

Note the partial search works too:

This setting will also apply to other search, such as searching in views:

Enter Seattle:

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, BI, Web, Cloud and Data Science.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *