+ Start a Discussion
Gallery IntegrationGallery Integration 

Why a new picklist value is created while an exact picklist value is already there?

Hi All,

So I have a picklist field containing several set of value.
One of the value is "PD - Chairman's Circle".

When a record is created through an apex code with this value, instead of using the same value, a new picklist value with exact name is created.
I wonder what causes this? Something to do with UTF-8 encoding?

 User-added image

Here is my apex code:

donationRecord.Donor_Tier__c = 'PD - ' + tokenWrapperInstance.category;
Best Answer chosen by Gallery Integration
RD@SFRD@SF
Hi,
API names cannot have symbols. What is it that you are trying to achieve?

All Answers

RD@SFRD@SF
Hi
What are the api names for picklist values at the object level, might help in the cracking this issue.

Thanks
RD
Gallery IntegrationGallery Integration
Hi RD,

the api names of the picklist values are "PD - Chairman's Circle".
Is it Okay to put symbol on the api name?

Thanks,
Steven
RD@SFRD@SF
Hi,
API names cannot have symbols. What is it that you are trying to achieve?
This was selected as the best answer
Gallery IntegrationGallery Integration
Hi RD,

Thanks for the help. But I manage to overcome this by removing the symbol.
Thanks