+ Start a Discussion
mgodseymgodsey 

Overriding Opportunity Tab with VF page

I'm trying to override the standard Opportunity tab with a custom visualforce page. Below is the page, but it's not availalbe in the dropdown for overriding the standard tab. Does anyone have any idea what I am missing? Thanks!
 
<apex:page standardController="Opportunity" extensions="OpportunityTabExtension" readOnly="true" tabStyle="Opportunity">
    <apex:sectionHeader title="{!$ObjectType.Opportunity.LabelPlural}" subtitle="Home"/>
    <apex:pageBlock title="Recently Viewed">
        <apex:pageBlockTable value="{!recentOpps}" var="opp">
            <apex:column headerValue="Opportunity">
                <apex:outputLink title="Opportunity" value="/{!opp.Id}">
                    <apex:outputfield value="{!opp.Name}"/>
                </apex:outputLink>
            </apex:column>
            <apex:column title="{!$ObjectType.Opportunity.Fields.OwnerId.Label}" value="{!opp.OwnerId}"/>
            <apex:column title="{!$ObjectType.Opportunity.Fields.StageName.Label}" value="{!opp.StageName}"/>
        </apex:pageBlockTable>
    </apex:pageBlock>
    <apex:pageBlock title="List Views">
        <apex:ListViews type="Opportunity"/>
    </apex:pageBlock>
</apex:page>

 
Best Answer chosen by mgodsey
bob_buzzardbob_buzzard
In order to override a tab your page has to use a standard list controller, whereas you are using a standard controller (which manages a single record).  There's more information at:

https://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_overrides.htm