In Microsoft Dynamics 365 Customer Engagement, you may encounter a need to filter records available in a lookup based on other information on the form. Filtering lookups for 1:N and N:N relationships can be achieved without custom code by updating Related Records Filtering under Field Properties for the desired lookup.
For example, on Work Orders in Field Service adding a contact lookup is useful for capturing the individual who requested or needs to be contacted for this service event. By default, this contact record would show all contacts available; however, we can filter this contact lookup just like the Opportunity contact lookup is filtered based on Account.
To demonstrate, I created a custom lookup to contacts on Work Order and enabled filtering by updating the Field Properties > Related Records Filtering to Only show records where Service Account (Work Orders) Contains Company Name (Accounts) (Contacts).
After saving the changes and publishing, the field on the form will now only show contacts that are related to the Service Account on the Work Order.
Figure 1: Pre-Filtering
Figure 2: Post-Filtering
Figure 3: Contacts Related to Service Account
No comments:
Post a Comment