Pages

Tuesday, June 17, 2014

Salesforce: Change Picklist Value

Picklist field is very commonly used in Salesforce. User can easily select a value from picklist, while for admin, it give better data quality, because user cannot just anyhow type in picklist.

But one day, we may have requirement to change existing picklist value with a new one, maybe for Classification from Bug to Defect. Depends on the requirement, you may need to leave all existing data with old value or change existing value to new value.

There are 2 options if you need to change existing value:

1. Create and Replace with New Picklist Value
  • Click New button to add New values (some fields such as Opportunity Stage, you need to enter Stage Name, Type, Probability, and Forecast Category).
  • Click Replace button and type the exact value you want to change in 'Exact Value Changing From', and select replacement value created above.
  • For custom field and some standard field, you will see "Replace all blank values" checkbox to update picklist field without value with a value.
  • Once done, you can delete the old picklist value.
Note:
  • This is a global change and will replace the picklist value for all existing records, including records in the Recycle Bin. 
  • This will update the Modified By date and time for all records where the value was replaced.

2. Rename Picklist Value
Go to a picklist value and click Edit link, then type in the new value. But some picklist fields, example: Opportunity Stage, it will not allow editing of the name, so have to use option no. 1 above.

Note:
  • All existing records value will be updated with new values.
  • This will NOT update the Modified By date and time.

For both option above:
  • It will by pass any validation rules and triggers
  • It will not tracked in field history audit

If you need to keep the old values, here you go:
  1. Create new picklist value
  2. Hide the old value (if you have record type, or dependent picklist) or delete the value.

Extra: delete a value in picklist will not change existing values for the record with that value.


Reference:


No comments:

Post a Comment

Page-level ad