function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KMK91KMK91 

Replace picklist

Hi ,
How to Replace old picklist value to new picklist values.
It's throwing an error when i'm replacing new picklist value.
EX : "abc" old picklist value
I'm replacing bcd instead of "abc".
Error: The picklist value "bcd" that you're trying to replace doesn't exist for this picklist.

Thanks
KmK
Best Answer chosen by KMK91
Mohamed IthrisMohamed Ithris
Hello KMK91,

Everything you need to know about renaming/manipulating picklist values is explained in the following link:

Difference between Renaming a Picklist and Replacing a Picklist Value (https://help.salesforce.com/apex/HTViewSolution?id=000175633&language=en_US)

Another option is to create a new value and then globally replace an existing value.
This is handy when combining values or if you want to keep your report filters intact using new or existing values. When viewing the picklist values of a Salesforce field, use the “Replace” button and enter the value you want to replace.
Then select the value to replace it with. You will need to have any new values added before replacing existing values.
Note: This is a global change and will replace the picklist value for all existing records, including records in the recycle bin.
Also, this will update the Modified By date and time for all records where the value was replaced. Replacing / Renaming a pick list value will not update the record history related list.

Better Way you change label.
Click edit : 'abc' and change the label name from 'abc' to 'bcd'

so API name of picklist value is : 'abc' and display name is 'bcd'.


Thanks
Mohamed Ithris

All Answers

Mohamed IthrisMohamed Ithris
Hello KMK91,

Everything you need to know about renaming/manipulating picklist values is explained in the following link:

Difference between Renaming a Picklist and Replacing a Picklist Value (https://help.salesforce.com/apex/HTViewSolution?id=000175633&language=en_US)

Another option is to create a new value and then globally replace an existing value.
This is handy when combining values or if you want to keep your report filters intact using new or existing values. When viewing the picklist values of a Salesforce field, use the “Replace” button and enter the value you want to replace.
Then select the value to replace it with. You will need to have any new values added before replacing existing values.
Note: This is a global change and will replace the picklist value for all existing records, including records in the recycle bin.
Also, this will update the Modified By date and time for all records where the value was replaced. Replacing / Renaming a pick list value will not update the record history related list.

Better Way you change label.
Click edit : 'abc' and change the label name from 'abc' to 'bcd'

so API name of picklist value is : 'abc' and display name is 'bcd'.


Thanks
Mohamed Ithris
This was selected as the best answer
Murali MattaMurali Matta
Hi KMK,

Click on field and check whether it "Restrict picklist to the values defined in the value set" is checked or not.
If it is checked then uncheck it.

Thanks,
Murali
KMK91KMK91
Thank you Mohamed it's working