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

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.




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


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