You need to sign in to do that
Don't have an account?
Connor Cain
Activate all picklist values using Apex
hello Everyone,
As strange as it sounds I am looking for a way to Activate all picklist values on the field level and recordtype level on an Object using Apex. This way, for a time, all records with deactivated values can be cloned or inserted.
As strange as it sounds I am looking for a way to Activate all picklist values on the field level and recordtype level on an Object using Apex. This way, for a time, all records with deactivated values can be cloned or inserted.
You can make use of the tooling api. There is a github source available with comprehensive libraries to use instead of you inventing the wheel
https://github.com/financialforcedev/apex-mdapi/tree/master/apex-mdapi/src/classes
Here is the example how to use it
https://developer.salesforce.com/forums/?id=9060G000000XbVHQA0
Let me know if this help