By Arpita Bose
The ability to create a picklist that can be shared across objects and restrict the picklists to only the values that are specified is one of the most interesting features in the Spring ‘16 Salesforce release.
What is a global picklist used for?
This is a very useful feature for customers if multiple picklists have the same value and need to be synced all the time. Global picklists allow administrators to create a centrally defined list of values, which can be accessed by any custom picklist fields created both on standard and custom objects, and with lots of options for adding, replacing, or removing values. This feature is available in both Lightning Experience and Salesforce Classic.
How do they work?
To see how global picklists work, let’s explore a scenario where a company wants to track multiple competitors on an opportunity. That’s not an unusual requirement. But in this example, we may also want to identify competitors on an account and any custom object.
To setup a global picklist that can be used in all of these objects, follow the below steps:
- Click on “Setup,” then “Create,” and then “Picklists BETA.”
Create a global picklist field “competitor” with a few set of picklist values, as shown below:
2. Now navigate to any of the objects — for instance, “opportunity” — to create a custom picklist field “competitor.” Select “Use global picklist definition” and select the already created field from the drop-down and add this field to the page layout.
The same process can be repeated on multiple objects as per the requirement.
To test this, create a new record on opportunity using the “competitor” field, wherein one can select any of the picklist values defined for the global picklist created before. This way, the picklist values will always be in sync on multiple objects, and can be controlled from just one place.
Simultaneous drawback and advantage
One important consideration about a global picklist is that it is a restricted picklist by default. Only a Salesforce admin can add or modify its values; users can’t add unapproved values, even through the API. But because global picklists are always restricted, your picklist data stays clean because users can’t add erroneous or redundant values through the API.