Microsoft Dynamics® CRM Training
An error occurred while loading the video. Please try again.
In Microsoft Dynamics CRM, lookup fields relate records to one another. When the lookup icon in the field is clicked, a Look Up Record dialog opens where users can select one or more records of defined entities.
By default, custom lookup fields allow users to relate all records of the designated entity. For example, say I create a custom lookup that relates a Contact to an Account record. If I were to click that lookup, I would see all Contacts in my organization and would be able to select any of them. What if I only want my users to be able to select Contacts that belong to this Account? In this scenario, I would want to configure the Related Records Filtering settings of that field, thus creating a filtered lookup.
To demonstrate this, I’ve created a custom field called “Ship To”. This lookup is meant to represent the Contact that will appear on shipping labels to this Account. I wouldn’t want someone that represents a different Account to be selected here, so I can use a filtered lookup to make sure that users only select someone already related to this Account.
To configure the Related Records Filtering settings, I click the Ellipses in the toolbar, and then click Form Editor. The Form Editor opens. I then double-click the Ship To field to open the Field Properties window.
In the Display tab, I scroll down to the Related Records Filtering section. To turn filtering on, I have to first check the box labeled “Only show records where”. The first dropdown contains a list of options regarding related entities. “Contacts (Parent Customer (Accounts))” is selected by default. The second field is labeled “Contains”, and “Current Record” is selected. This filters the lookup to show only Contacts whose parent Account is the currently open record.
Notice the Allow users to turn off filter check box. If I uncheck this, I am restricting my users the option to clear the filter once the Look Up Records dialog opens. If it’s checked, users can clear the filter in the dialog and select another Contact that does not meet the filter criteria. This comes down to the needs of your business and the purpose of the field. I’ll allow my users the option to choose Contacts that aren’t related to this Account.
When I am done configuring the field, I click the OK button, and then save and publish the entity in the Form Editor. I can then reopen the record to see this filtered lookup in action.
If I click the lookup icon in the Ship To field, then click Look Up More Records to open the Look Up Record dialog, notice that only related Contacts are available to choose from. Since I allowed for the filter to be turned off, I can uncheck the filter box to choose any Contact.
For more tips, tricks, and tutorials, please refer to the Success Portal or our xRM.com blog.