I have one custom object related to Account. The custom object has 3 record types and I would like to control what record type opens for the user. Record Type (Master) opens an older force.com layout. Record type 2 opens a newer force.com object layout with 5 fields. Record type 3 should open a visual force page with many more fields.
What is the best way to allow a user to open a record that used any one of these record types/page layout assignments? Its a mix of force.com and visualforce so not sure what others have done in this case that I can leverage.
I am not trying to restrict access but merely allow the proper layout to be displayed based on the record type.
I created a formula field on the customer Account Summary object to calculate the RecordTypeName__c rather than use the controller to figure that out.
The controller loads OK but when I add the jscript to the VisualForce page the page starts looping reloading itself and the VF page shows this error:
'Attempt to de-reference a null object'