function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
wt35wt35 

Get Record Type - Picklist Entries dynamically from Apex

Hi all,

 

I am trying to get Record Type - Picklist Entries dynamically from Apex, does anybody know a way to achieve this?

 

To be more detailed, this is what I am trying to find out:

 

In Accounts, I have a Record Type called myRecordType.

I also have an account picklist called myPicklist, containing three values, only two of which are associated with myRecordType.

I want to use Apex to find out which are the two values associated to this record type, thanks to the Record Type and Picklist Name.

 

Thanks!

Dev@Force.ax647Dev@Force.ax647

Use dynamic apex to get picklist valuse and then query recordtype object to find which are record types

 

http://blogs.developerforce.com/developer-relations/2008/12/using-the-metadata-api-to-retrieve-picklist-values.html

wt35wt35

I actually won't have time to test this for my project but I believe that explains how to do it...