I have a custom object called Marketting_Information__c. On it I have a picklist field Title__c. Now I have a Visualforce Page where a User selects a particular RecordType from the dropdown and based on that I have to show the picklist values (Not all, just those enabled for the RecordType). Can someone please help me here? How can we have a dependency based on RecordType in a Visualforce Page?


2 Answers 2


Essentially, you create and save the new record type along with a new page for it. Once you do, you can assign the pages and Record Types to different profiles. You'll then have a Page Layouts related list and a Record Types related list.

In one or the other, click Page Layout Assignment > Edit Assignment. From there you can assign the different picklist fields you want to be visible to one or both of the RecordType pages.

There's a good description of this in the Force.com Workbook here.


If I'm reading your question correctly, you are looking for a programmatic means of displaying the correct picklist values given a specific record type on an sobject.

I need to do something similar and have been looking at solutions. From what I have read nothing straightforward, unless you can use apex inputfield in a visualforce page, as that respects picklist values for record type.

Otherwise, its more lifting than it seems like it should be. This post by Abhinav Gupta seems to be quite robust, and has links to some other approaches.


Will likely be trying this myself soon. Hope it works for you!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .