How to Set Up Cascading Lookups in Portal Forms
A cascading lookup filters the options of one lookup field based on what the portal user selected in another field. For example, after a portal user selects an account, the Contact field lists only that account’s contacts. This keeps data entry faster and stops portal users from linking records that don’t belong together.
Before you start
- You need access to Design → Form Builder in the admin portal.
- Cascading works on Add and Edit form types.
- The dependent field must have the Lookup data type.
- Both fields must be on the form, and the two entities (Dynamics 365), objects (Salesforce) or tables (Business Central) must be related in your CRM.
Steps
- Go to Design → Form Builder.
- Open the Add or Edit form, or create one. See How to Create a Portal Form for Any CRM Entity.
- Make sure the controlling field, for example Account, is on the form.
- Select the Settings icon on the dependent lookup field, for example Contact.
- Enable Cascading.
- In Parent Field, select the field that controls this field’s options.
- In Field Linked to Parent, select the field on the dependent entity that links it to the parent.
- Save the field settings.
- Publish the form.
| Setting | What to select |
|---|---|
| Parent Field | The field on the form that controls this field’s options. |
| Field Linked to Parent | The field on the dependent entity that links it to the parent. For example, the field on Contact that links to Account. |
Example: contacts of the selected account
On a case form, you want portal users to pick an account and then a contact from that account only.
- Add the Account and Contact lookup fields to the case form.
- Open the settings of the Contact field and enable Cascading.
- In Parent Field, select Account.
- In Field Linked to Parent, select the Contact field that links to Account.
- Publish the form.
In the portal, the Contact field now lists only the contacts of the account the portal user selected.
Other lookup field settings
Lookup fields have more settings that change which records they show. Check them if a cascading lookup shows unexpected options.
| Setting | What it does |
|---|---|
| Form Global Access | Shows all data of the related entity in the field, regardless of filters or restrictions. |
| Workflow Setting | In the Data Load drop-down, applies a workflow with the Load Data action type that restricts which records the field shows. See How to Apply Workflows to Portal Widgets. |
| Custom Form View | Sets which fields, up to five, show for each option in the lookup and in what order. |
Troubleshooting
The Cascading option is missing: Check that the field has the Lookup data type and that the form is an Add or Edit form.
The dependent field shows no options: Check that the portal user selected a value in the parent field and that Field Linked to Parent is the field that links the two entities in your CRM.
Related articles
- How to Create a Portal Form for Any CRM Entity
- How to Show or Hide Form Fields Conditionally
- How to Apply Workflows to Portal Widgets
- How to Link Parent and Child Records in a Form