function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Elizabeth JacobsElizabeth Jacobs 

2 VF pages based on a specific account record type and profile

I currently have numberous account record types.  For one specific record type "CSLS" we are using a tabbed Visualforce page that all users can see if they access this specific record type.  When viewed this record type has 7 tabs, based on the related list associated with it.     The current tabbed account VF page is redirecting the user to the page via the Button, Links and Actions override "View" section.
I would like to have another tabbed VF page for record type "AR" but exclude 3 of the seven tabs from view based on the users profile. 
I have created a new tabbed VF page for the "AR" record type that only displayes the 4 tabs needed but how do I incorporate the two pages so the correct tabs are viewed based on the record type and profile?   Thank you in advance for any insight or feedback you can provide.

You have to create a visualforce page that acts as a landing page with a controller that redirects the user to the required VF page.
something like the below:

<apex:page standardController="Account" extensions="apxAcclanding" action="{!fetchpage}">

The fetch page does the redirecting in the controller.