Who hasn’t had this issue? You’re looking for a contact in Microsoft Dynamics CRM, you enter a search phrase like “Meyer*proMX*Nuremberg“ – and end up with no results.
This type of search, using a contact’s last and company name is not possible in Microsoft Dynamics CRM’s default setting. While the system will search multiple fields, it only does so sequentially. Meaning, it checks whether it can find the value “Meyer*proMX*Nuremberg” in either Last Name, Company name or City.
To be able to find a contact this way, all you need to do is create a new field and workflow. In the following example, I will explain to you how to search across contact fields for Last Name, Company Name, and City.
- First, create a new field „Search Phrase“ in your contact. This field must be searchable, of course. Choose field type Simple field, format Text and a maximum length of 250 characters and data type Single Line of Text.
- Now, open the contact view Quick Find Active Contacts and add the new field as a search column. Then, Save and Close.
- In the category Workflow, create an on-demand process “Contact – Indexing” set to the entity Contact. This workflow can run in the background and should start when a contact is created or changes are made to one of the following data set fields: Last Name [lastname], Company Name [parentcustomerid] or City [address1_line]
- Add a Step „Update data set“. Click Edit settings and input the data set fields created in step #3 in the newly created field Search Phrase.
- Activate the workflow and publish the customizations.
- Finally, apply the created workflow to all contacts in order to fill the field Search Phrase.
And you’re done! If you now use the same search phrase, you will find your contact!
Of course, you can combine all possible data set fields within the field Search Phrase and change their order as you see fit. The workflow can be applied to all entities.
Since the fields Last Name, Company Name and City are now combined in one field, you don’t have to search every single field and thus, performance is improved.
You can avoid the inconvenience of having to search in a particular order, by creating additional search phrase fields and using a workflow to describe them in different orders.
Three fields should be searched: Last Name, Company Name and City
Field #1 “Search phrase 1”: Last Name + Company Name + City,
Field #2 “Search phrase 2”: Last Name + City + Company Name
Field #3 “Search phrase 3”: Company Name + City + Last Name, etc.
Have fun customizing!