Picklists and dependent picklists are used in Salesforce to create a connection between fields in a record. This connection ensures that users enter accurate and consistent data. A dependent picklist in Salesforce is a type of picklist field whose available values are dynamically filtered based on the selection in another field, known as the controlling field.
Pre-requisite:
- The “Customize Application” permission is needed to define and edit dependent picklists.
Steps:
- Prepare Your Fields
- Ensure you have two fields:
- Controlling Field: This can be a standard or custom picklist, checkbox, or Boolean field.
- Dependent Field: Must be a custom picklist or multi-select picklist.
- Ensure you have two fields:
- Navigate to Object Manager
- Go to Setup.
- Under Object Manager, select the object (e.g., Account, Contact, etc.).
- Set Up Your Picklists
- In the object, go to Fields & Relationships.
- Create or identify the controlling and dependent picklist fields.
- Add appropriate values to each picklist.
- Define the Dependency
- In Fields & Relationships, click Field Dependencies (usually on the top-right).
- Click ‘New’.
- Select the ‘Controlling Field’ and ‘Dependent Field’.
- Click ‘Continue’.
- Map Values
- Use the dependency matrix to map values:
- The top row represents controlling field values.
- Columns represent dependent field values.
- Select the values (they turn blue) below each Controlling value, then click ‘Include Values’. To remove previously added values, click ‘Exclude Values’. Note: instructions are included on this page to help guide you.
- Use the dependency matrix to map values:
- Save and Test
- ‘Save’ your changes.
- Test the dependency:
- Go to a record for the object and check that the dependent picklist displays appropriate options based on the controlling field.
For Dependent Picklist Considerations, reference this Salesforce help article.