If you have been using Salesforce for a while, you probably have been faced with the need to modify Salesforce picklist values in your environment.
While this may seem like a simple task, if not thought out properly, modifying Salesforce picklist values can lead to various complications down the road ranging from reporting challenges to unintentional loss of data. Below are the options you have when adding, editing, replacing, deactivating, or deleting values:
Adding Picklist Values:
If the current values in a picklist or multi-select picklist field are sufficient for your business, but you do need to add an additional value(s), first navigate to the relevant object’s “Fields & Relationships” area from the Object Manager in the Setup Menu. Click into the picklist/multi-select picklist field in question and select the “New” button to begin adding a new value(s). Enter each value on a separate line. If you are using multiple Record Types on your object, select the Record Type where the new value(s) should display, and click the “Save” button.
Editing (Renaming) Picklist Values:
If you want to simply rename an existing value in your instance, locate the field and individual value within Setup Menu, and click the “Edit” link. On the screen that displays, change the Label and/or API Name for the value. For instance, if you want to change the value from “Web” to “Web Page” in the Lead Source field on the Lead object, edit the value and rename it. One word of caution, changing the API Name for picklist values can potentially break integrations that use the field being modified.
Some out-of-the-box Salesforce picklist fields do not allow administrators to change the API Name; however, you can change the field label using “Rename Tabs and Labels” from the Setup Menu. For example, the “Stage” field on the Opportunity object cannot be modified in terms of an API Name; but can be relabeled to a different display name that better suits your business process. From “Rename Tabs and Labels,” click through to Step 2 where you are able to add new field labels. Click “Save” to confirm the change.
One final consideration when editing picklist values – if you modify an existing value and the value is used in a report filter or list view filter, then that report or list view may not work as expected. An error message will likely display when accessing the report/list view since the previous value now does not exist. Be sure to update relevant filter criteria when making any value edits.
Replacing Picklist Values:
If you’d like to remove a value entirely and map all of your existing data containing the value to a new value, the best option is to leverage the “Replace” functionality. This is especially handy when combining values or if you want to keep your report filters intact using new or existing values.
First, you will need to ensure that the value you are using as the replacement has already been created within the field. Next, select the “Replace” button, enter the API Name of the value you’re looking to replace, and select the replacement from the drop-down. When saved, this change is a global action and replaces the picklist value for all existing records, including records in the recycle bin. Also, this will update the Last Modified By date, time, and user for all records where the value was replaced.
Deactivating Picklist Values:
When you want to prohibit users from selecting a value, but you would still like historical records to contain the information, the best option to use is “Deactivating” the picklist value. When this option is chosen, the particular value no longer appears in the picklist dropdown, but the information will still be displayed on records and in reports/list views that contain the value.
To deactivate a picklist value, select the “Deactivate” link next to the value’s name. A confirmation screen will display asking if you really want to deactivate the value and clicking “Ok” will confirm the change. A deactivated value can always be reactivated, so this is a particularly helpful option if you’re not entirely certain you want to replace/delete data.
Keep in mind that if you decide to deactivate the value, it will still show up in reports and list views but you will not be able to use it in filters since it is no longer a valid picklist value. You can get around this by using the criteria of “Picklist Field” “not equal to” and then select all available values. This will then return all records that do not have a valid (selectable) picklist value.
Deleting Picklist Values:
One final option administrators have in regard to picklist value management is the option to delete values outright. When selecting the “Del” link next to a value, one of two things will happen: (1) The value is removed from the picklist and existing data is replaced with a blank value or (2) an administrator can choose a value to replace the deleted value with similar to the “Replacing Picklist Values” process outlined above.
Now that you understand the different options and ramifications of adding, editing, replacing, deactivating, or deleting values, you can make the choice that best meets your needs.
If you have questions about this subject or would like to explore making such a change at your company please contact us.