I have 10 record types. I want to display selected record type name as section header in VF page? how can i show that?
[SalesForce] How to show Record Type in section Header
Related Topic
- [SalesForce] Show record type values as radio buttons on visualforce page
- [SalesForce] Choose record type based on picklist value
- [SalesForce] Show record type selection screen
- [SalesForce] Launch VF Page After Record Type Chosen
- [SalesForce] How to control which record type is selected by default when creating a new record
Best Answer
Well if you use the standard controller (with ou without extension, it does not matter) of the Account object, you can do :
If you use a custom controller :
I know the code is completely dirty but you get the idea ;)
The
rendered
tag is useful if the Account does not have a record type (it can happen when you create record types when accounts already exist for instance), so you avoid yourself a "Attempt to dereference a null object" error thrown at you face haha