+ Start a Discussion

Is it possible to add values in picklist field via apex api?

I have a picklist field "MeetingType" in Opportunity object. It has 3 values, such as xxx, yyy, zzz.


I want to add or delete the picklist values in apex class.


Is it possible to add value "mmm" or delete "zzz" in this picklist field via apex metadata api?



Picklist values are part of application metadata and cannot be changed from Apex.  You can, however, use metadata API from outside the platform to do this.
Can we use ajax to update it with metadata?