Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I would like to mass update picklist values in a custom object from picklist values in a standard object.

In the absence of universal picklists, i am having to manage a few picklists in different objects. These picklists have hundreds of options and keeping them in-sync is proving to be a challenge.

Does anyone know of a way that i can update en-masse a picklist on one object from another picklist on a separate object? Either via using excel, data loader, or the api?

Thanks.

share|improve this question
add comment

2 Answers

You could use the MetaData API to create the Picklist values. See Picklist.

Depending on your needs you could use the Declarative Metadata syntax with the Force.com Migration Tool.

share|improve this answer
add comment

You can also use the metadata API from apex. See here to learn how. I implemented a solution that updates a set of picklists from the contents of a custom object using this API. The code in this question gives you an example of how to update the picklists in Apex. Or you could use the metadata API from an external client (which is the more common use). In addition, you need to use the Schema.DescribeFieldResult class to pull the values out of your master picklist (getPicklistValues() instance method will get you the list of values). Note that it's only updating the picklist values and won't change the values stored with any existing records.

share|improve this answer
    
I'd be VERY interested to learn more about your solution.. –  Antonio Herrera Jan 21 at 3:50
1  
@AntonioHerrera I posted some of the code in this question –  donmac23 Jan 21 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.