4

DescribeLayout() will give you infomation about the layout and related values, including picklist values. (eg PicklistForRecordType). However, I just want to get the picklist values based on RecordType. I don't want all the information about layouts. Is there an API call or option that can do this?

This stackoverflow post shows how to get them going thru the layout but is there a way to just go straight to picklist values from RecordType?

This answer seems similar how to get a picklist all values in apex controller but doesn't seem to do it.

There are lots of ways to do this using apex (example here) but we can't really use apex and would much prefer just an API call similar to what is asked for in this post in the dev forum.

1
  • 1
    You said you can't really use Apex...any specific reason for this? Seems to me like you could write this in an Apex method, expose it as a webservice, and call it through the SOAP API.
    – JCD
    Mar 14 '14 at 18:46
1

I don't think you can do it this way because the picklists are not part of a record type, they are part of a layout. You just need to make the extra calls. There is no syntactic sugar to do the mapping for you. You could write some Apex code to do that though.

The mapping of record types to layouts is N to 1. You might have a different layout per record type, but you also might have all your record types point to the same layout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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