You need to sign in to do that
Don't have an account?
wt35
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!
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
I actually won't have time to test this for my project but I believe that explains how to do it...