+ Start a Discussion

Multiple Record Types on one visualforce Page??

Is it possible to have multiple record types on one visualforce page? I ask this because I have users that want all of the record types associated with a custom object on one page. Each of these record types share fields. So say we have a OpenDate__c field that resides over 9 record types. They want that field to be displayed on all the record types all on one page.  So all 9 record types would display on one visualforce page and the one OpenDate__c field would reside in each of the record type's section of the page. I know this is really convoluted in explination. I do not have a better way of explaining this.


I have said that I do not think this is possible, it just doesnt make sense to me from the data perspective. If anyone has some insight on this I would really appreciate it.




Well, if you are talking about data with multiple record type, yes you can. For example, If you have pageBlockTable / dataList to show Acconts, and those Accounts can be any record type.

However, if you are taking about field definition, like picklist options which depends on Record Type, no, you can't. Unfortunately, VF page has no sense of record type. I found a post saying it's on the road.


but I'm not sure when it is. I tried picklists, but it always shows everything. I looked at the getDescribe(), but no way to get the Record Type dependent data. Only way to get that is to access to metadata API from controller... but it is too much.


Message Edited by ThomasTT on 10-21-2009 01:11 AM