I am trying to access just the "Selected" picklist values for a field using the REST API via the databasedotcom Ruby gem.

In the normal SFDC interface, a user can navigate to "Campaigns > Record Types > MyRecordTypeOfChoice > Picklists Available for Editing > Edit" and move items between the Available Values and Selected Values lists.

However, when I do client.materialize("Campaign").picklist_values("MyFieldOfInterest"), I get a combined list of the values in Available Values and Selected Values with no indication of which values came from which list.

Is it possible to retrieve only the Selected/Active Picklist Values using the SFDC REST API?

  • Did you try with the picklist which has different value in 'Available' and 'Selected' list?
    – Priyanka
    Nov 28, 2012 at 4:56
  • @Priyanka I'm not sure I understand the question. As far as I am aware, the values in the "Available" and "Selected" lists are always different, with the ability to move them between one and the other via the "Add" and "Remove" buttons.
    – user540146
    Nov 28, 2012 at 17:17

2 Answers 2


There have been similar questions before, for example https://stackoverflow.com/questions/7810801/how-to-describe-enumerate-picklist-enties-valid-for-a-specific-record-type-in

I don't think it's possible. REST API will only let you learn the relationships between dependent picklists (which values in child are valid for which values on parent) and if you need that - you can read about it in Get lists of dependent picklist options in Apex

To obtain info about availability per record type you'll have to use Metadata API (either to download the object definition like *.object files in Eclipse IDE or issuing a describeLayout() call). Both of these aren't available from pure Apex so creation of smart service exposed as REST is also not a valid solution.

If hand-crafting SOAP sounds like too much hassle - install Eclipse IDE to familiarize yourself with the *.object files and if you think these XMLs look workable you could always write some scripting around Migration Tool that's able to download this info without the burden of clumsy IDE.

I've heard some gossip about Salesforce guys working on "Tooling API" that should be easier to use than what we have now... fingers crossed, safe harbor blah blah blah ;)


It's possible through the services API (Which is soap based). You can use my Metaforce gem to do this.

  • Metaforce looks great! What would be the Metaforce equivalent of client.materialize("Campaign").picklist_values("MyFieldOfInterest")?
    – user540146
    Nov 30, 2012 at 17:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .