I have a custom object with 5 record types FSAL, ISAL, Reg Man, Nat Man, VP, FAS.

I want to create a VF Page for each record type. When I try to override the button I am able to navigate to only VF page for all record types. Is there a way I can assign each record type with individual VF Page.

  • 2
    Create a dispatch VF page with a controller that checks record type and redirects to the appropriate VF page for that Record Type. Use that dispatch VF page in the override button.
    – dBeltowski
    Commented Sep 7, 2016 at 20:59

1 Answer 1


You can't assign via the UI, but you can do either one of the following:

  1. Create a Visualforce that redirects the user to another Visualforce that is specific for the record type. In the Visualforce, inside the <apex:page> tag put the attribute action to call a method from the controller, and in the controller set the method to return a PageReference to the page you need.

  2. Create a Visualforce that hides/shows the fields/functionality you need in order to do what that specific record type needs to. You will create just one page for every record type (I don't recommend doing this because it will probably get too hard to maintain this).

  • Eh 2 is pretty easy. You just need a map of RecordType to FieldSet. Even if you want to support multiple sections it wouldn't be that hard to scale up.
    – Adrian Larson
    Commented Sep 7, 2016 at 22:51

You must log in to answer this question.