Posted by Bob Bowes, Senior Consultant
Salesforce allows users to create custom objects and fields that fit their organization’s needs. One type of field that is especially helpful is a picklist field. Picklists allow administrators and developers to create a pre-defined list of options for the field, which can bring clarity to an organization’s data and provide a useful categorization for reporting. With the Spring 16 release, Salesforce extends picklists by introducing global picklists.
Why Global Picklists?
These are advantageous when an organization has many objects, standard or custom, that have picklist fields with the same option values. Global picklists give your administrator a time-saving tool needed to have just one main list of options that can be used by picklist fields in all objects. This can be especially helpful when picklists have many option values such as states, counties or countries. By using global picklists, problems with redundant values and spelling errors can be reduced as well. Global picklists feature the same options to Add, Replace and Remove values as regular picklists do and administrators can create and use global picklists in both Lightning Experience and Salesforce Classic.
How to use Global Picklists
To see how to use global picklists, let’s look at a possible scenario that any organization may face: a list of languages. Our example organization has departments that need to collect language data on customers (accounts), contacts and job applicants. To ensure that the data can be summarized correctly, there is a need for a standard list of languages.
To create the global picklist, the administrator clicks on “Setup,” then “Create” and then “Picklists BETA.”
This opens to the Global picklists list view page. From here, the administrator would select New to create a new picklist.
Enter values for Label and Developer Name (Developer Name will be the actual unique name for the picklist). In this example, the administrator enters Languages for both fields. A description field is available if there is some descriptive information needed for the list. Choose “Save” or “Save & New” if another picklist needs to be created.
After saving, the details page opens, showing the values for the label, developer name and description. Below these are 3 related lists: Picklist Value Set, Inactive Picklist Values and Fields Where Used.
Our administrator would then click New to add picklist values:
Just like regular picklist fields, each language value is entered on a separate line. When the list is finished, click “Save” to return to the details page.
Notice that the Picklist Value Set has the same buttons available as the regular picklist, but the list view has a new feature called Deactivate. By clicking the Deactivate link next to any value will add it to the list of Inactive Picklist Values. Once in the Inactive list, a value can be reactivated using the Activate link (highlighted below).
Now it’s time to use it in an object. The administrator then opens the custom Applicant object to add the new Language picklist field. Enter values for the field label and field name. The option Use global picklist definition is already selected for Values. The global picklist Languages is selected from the dropdown list. Click Next to add the visibility to the necessary profiles, then click Next to add the field to the page layout and click Save. The administrator would repeat the process on Account and Contact objects to meet the requirement.
The administrator then navigates to the page layout for Applicant to ensure that it is viewable and filled with the active options.
Notice that French is not in the dropdown list as it was deactivated.
That’s all that’s needed to create and implement a global picklist.
Things to keep in mind
Global picklists are restricted picklists by default; therefore, only a System Administrator can create the list and add or modify the picklist’s values. This will help reduce redundancy in values and keep potentially unapproved values from being entered.
Global picklists are also available for change sets, so a picklist can be created in a sandbox and moved into another sandbox or even production just like custom object and custom fields. However, the destination environment must be on Spring 16 or the change set will not deploy the global picklist.
By introducing global picklists, Salesforce now has a valuable time-saving tool for administrators and developers that will help keep data consistent across objects. Many organizations will find them very useful.