+ Start a Discussion
bzain9bzain9 

Redirecting users who click the "New" Button on Account Tab using Visualforce page.

I have created a visualforce page to redirect users who click the "New" Button on the Account tab back to home page giving an error at the top of the screen that they are not allowed to make a new Account. When I implemented and tested, this held true but now I face the challenge of allowing certain user profiles that should be allowed to make the new account using the button, and the others that shouldn't be able to make a new account using a button.What would I add/change in the visualforce page to let this happen?

Here is the code:

<apex:page standardcontroller="Account" showHeader="true" tabStyle="Account" > 
<p style="color:white;font-size:6px;"> 
<apex:form > 
<apex:pageBlock > 
<apex:pageMessage summary="Please create new accounts via the lead conversion process." severity="info" strength="3" /> 
<apex:pageMessages /> 

</apex:pageBlock> 
</apex:form> 
<apex:sectionheader title="Accounts" subtitle="Home"></apex:sectionHeader> 
</p> 

<!-- <apex:ListViews type="Account" /> --> 
<apex:enhancedList type="Account" height="730" rowsPerPage="25"/> 
</apex:page>