I am trying to set picklist value via Apex code. Please find the below details.
We have 2 picklist values in one field named Company Email with values
We want to set the values to picklist via Apex something like below
Account acc = [select id, Company_EmailOpt__c from Account where id = '0014E99999vIin']; acc.Company_EmailOpt__c = 'Yes'; update acc;
Now when we run this piece of code the picklist values has 2 'Yes' in the drop down. (attached screenshot)
It is quite confusing to the users.