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
Rajesh NRajesh N 

Update Global picklist values through Apex

Hi,

We are using global picklist as master data for organisation. Here the requirement is to update globalpicklist value through apex code. Unable to find the associated object for refering in Apex. As it was in Beta version not sure even this is possible. In my search found solution's like using meta deta we can update normal picklist values(not sure how to do). Please suggest how to proceed. 

Can we have all the permissions for global picklist as we have for custom setting in comming releases?

Regards
Rajesh

 
Saroja MuruganSaroja Murugan
Hi Rajesh,

We can't update metadata using apex.

Please refer the following link to update the Metadata
 
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_globalvalueset.htm

If you want to update value of global picklist then refer the below link

https://developer.salesforce.com/forums/?id=9060G000000I5h4QAC

Thanks,
Saroja
Sweet Potato Tec