One of the issues that CRM had was how to filter records in a lookup control that is dependent on another control on the form. An example of this would be if I use the account and contact entity and have a connected entity in between such as maybe a position.
I will use an example of Property Management where I have Properties (account) and Tenants (contact), and a connected entity in between called Rental Unit.
One of the issues that CRM had was how to filter records in a lookup control that is dependent on another control on the form. An example of this would be if I use the account and contact entity and have a connected entity in between such as maybe a position.
I will use an example of Property Management where I have Properties (account) and Tenants (contact), and a connected entity in between called Rental Unit.
The first step that I want is to add two fields to the contact form, one for property and one for unit:
Now that the fields are on the form, I need to use the Related Records Filtering feature in CRM 2011 to only show the related records in the steps below:
- Open the Tenant (contact) form, and click on the Customize Ribbon Tab.
- Select Form from the Design Tab group to open the Tenant form in Design Mode
- Select the lookup control that you want to filter the results for, and click on the Change Properties button in the Edit Group of the Ribbon.
- The field Properties webpage dialog will open.
- One the Display Tab check the “Only show records where:” under the “Related Records Filtering” section.
- Select the required values from the drop downs. In our case it would be:
Property (Tenants) Contains Property (Units)
- Save the Form
- Publish the contact (Tenant) entity.
When you click on the Units lookup after you have selected the Property, only the Units for the selected property will appear: