[SalesForce] Restrict picklist values to show based on recordtype

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?

Best Answer

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.