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
arunadeveloperarunadeveloper 

How to get picklist values of recordtype and display as drop down on visulaforce page

Hi there,

 

I have 2 redordtypes with picklist values , when vf1 page loads i need to diplay recordtype1 picklist values as dropdown and if when vf2 page loads i need to diplay recordtype2 picklist values as dropdown.

 

any one please suggest me how to get the picklist values of record type and display on visualforce page.

 

Thanks

 

AsitM9AsitM9

Apex doesn't allow us to query on page layout. But using api call we can query to page layout. 

 

Java script example :

 

var recordTypeId='{!selecteRecord}';
result = sforce.connection.describeLayout('o2bc__Service_Request__c', new Array(recordTypeId));