+ Start a Discussion
AmanAman 

PickList Value acc. to record type

 

Hi,

 

I have a object i.e. (Application) with two record types name A and B.

i want to get picklist values (some field of Application object i.e Permissions) through Apex only of record type A:-

i am doing like this...

 

Schema.DescribeFieldResult F = Application__c.Permissions__c.getDescribe();
         List<Schema.PicklistEntry> P = F.getPicklistValues();
   
        Permissionsfields=new Set<String>();
   
      for(Schema.PicklistEntry pp:P)
      {
      permissionsfields.add(String.valueOf(pp.getValue()));
      } 

 

It gives me all the picklist values of Permissions fields, if i want to get Picklist values of a particular record type, how could i get.

 

Please help me.