Dependent picklists
Let’s spend some time discussing dependent picklists. They are single or multiselect picklists whose values depend on a controlling field that must be a picklist field (with at least one value and fewer than 300 values) or a checkbox field for the same record.
This relation between fields helps keep data accurate and consistent.
Let’s say we want a secondary picklist on a Case Detail object called Invoice Reason whose values depend on the Invoice Type. We want this to have the following relations:
Controlling value (invoice type) | Available values (invoice reason) |
Purchase | Store purchase Online purchase |
Subscription | Monthly subscription Weekly subscription |
Reimbursement | Wrong purchase Flawed item |
Dependent picklist values example on the case detail object
At first, we create a new picklist field on the Case Detail object, and then we click on the New link on the Controlling Field in the Picklist Options section:
Controlled picklist definition on the case detail object
Then, select the Controlling and Dependent fields:
Controlling and Dependent picklist relations
For each controlling value, select one or more (or none) controlled values (click the Include Values/Exclude Values button to select/deselect a value):
Dependent picklist values selection
Click on Save and the magic is done.
Create a new Case Detail object and select different values for the Invoice Type field to see the Invoice Reason field set changes:
Dependent picklist on page layouts
There are a few things to remember:
- Dependent picklists cannot have a default value
- Standard picklists cannot be dependent picklists
- A controlling picklist field must have from 1 to 300 values
- A dependent field can also be a controlling field for another picklist
- The available dependent values also depend on record type configuration
- Both controlling and dependent fields must be shown on the page layout
Summary
In this chapter, we have learned about the different ways to link Salesforce objects together using diverse kinds of relationships. To ensure better data consistency, we learned about the important aspects of validation rules and some advanced formula functions.
Finally, to achieve even better data quality, we looked at how picklists can deliver a consistent use of global value sets and how dependent picklists can ease user experience with standard page layouts.
In the next chapter, we’ll be covering sales and service cloud features that will give your implementation the wow! effect.