Overriding Standard Tab to Hide Unwanted Features Using a Simple Visualforce Page

Have you ever come across a scenario where you do not want your end users creating new records from the standard tab? Or you do not want them accessing the Reports and Tools sections from the standard tab page. If yes, then let me show you how you can easily accomplish this with three straightforward lines of Visualforce code.

Opportunity Home Tab
Opportunity Home Tab


Requirement: As a system administrator, I want the Opportunity Tab to be overridden for all profiles other than the System Administrator profile. The other profiles shouldn’t be able to create new records from the Opportunity tab and the Reports, Tools, Quarterly Summary sections shouldn’t be visible either.  Reason? Our company wants the users to create Opportunities only from Accounts.

Solution: This cannot be accomplished using a point and click approach since Salesforce doesn’t allow us to customize the standard tab pages. So we will create a simple VF page and then override the Opportunity Tab with this page.

  1. Create a VF page with the code below:Code
  2. Navigate to Setup -> Customize -> Opportunities -> Buttons, Links & Actions, and override the Opportunities Tab with the above VF page:Override

And voila! With just three lines of code and a simple tab override, we were able to get the desired user experience.


System Administrator Profile
System Administrator Profile



Non System Administrator Profile
Non System Administrator Profile


Let me know in the comments below if you accomplished such a requirement in a different manner. If you are looking for a free app that lets you do this, you must look into the following:

Click me!


Good luck!

This Post Has One Comment

  1. Jennifer Allen Ivancic

    I just found your post about removing the “New” button from the Opportunities Tab

    and I still have a “New Opportunity” button on my page (not simply “New”, but “New Opportunity”)…i can see in your last screen shot, you too have it…is there another step that your post may be missing? I would love to know how to get rid of it.

Leave a Reply