Here we will learn to customize the auto-complete lookup search in Dynamics 365. Before we start, make sure to subscribe to CRM Crate.
Understanding the Advance Lookup in Dynamics 365
Advanced lookup supports customizations on lookup control through Client APIs such as addCustomView, addCustomFilter, addPreSearch and removePreSearch
- To use Advanced lookup, select the lookup icon (magnifying glass) on any lookup column and then select Advanced lookup.
- The Advanced lookup gird opens with a list of rows.
What is Typehead / auto-complete search in the lookup?
The typehead search allows us to automatically search the lookup records while typing the search text. For example, with help of the typehead feature we can populate the record with name “Abhinav” by simply typing the first four alphabets “Abhi” in the lookup search as shown below.
Customizing the Typehead search criteria or trigger –
Depending upon the business scenarios and system resource usability, we can have a requirement for limiting the typehead trigger.
Consider a scenario where we need to trigger the typehead search after the user enters first 4 alphabets, we can achieve such customizations using the OOTB lookup behaviour properties.
- Open the Power Platform Admin Center (https://admin.powerplatform.microsoft.com) and select the environment for customizing the lookup typehead or auto-complete.
- Navigate to the Settings >> Product >> Behaviour.
- Now, navigate to the “Lookup Behaviour” section, here we can find the controls to customize the minimum number of character to trigger typehead search and delay between character inputs that will trigger a search.
Minimum number of character to trigger typehead –With help of this control, we can trigger the typehead or auto-complete once the minimum number of characters or alphabets are entered in the lookup search.
Delay between character inputs that will trigger a searchThis field is used to trigger a typeahead search based on delay occurred while entering the input characters in the Search box present in the Advanced Lookup window.
Thus we learned to customize the typehead or auto-complete for the lookup fields in Dynamics 365 CRM.