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
saisaisaisai 

Cannot find my VF Page to override in the list of pages.

I have created a new page and then i m try to override my account tab by navigating to:

Customize | Accounts | Buttons & Links | Standard Buttons & Links | Edit Accounts Tab | Override With | Visual Force Page

 

I cannot see my newly created page here.

However i see it in :

Setup | Develop | Pages.

 

Please help if i am missing anything.

Thanks

Sai

Devendra@SFDCDevendra@SFDC

Hi,

 

Have you specified a standard controller for that VF page with the same object?

 

 

Yoganand GadekarYoganand Gadekar

Hey make sure your page is a standardcontroller="Account"

 

if it is not defined as above , you will not find the page in the overide list of vf pages.

 

Hit kudos and mark this as answer if your query is resolved.

saisaisaisai

Here is my VF Page standardAcctPage i still cannot find this in my overide page:

 

<apex:page standardController="Account"
           extensions="overrideCon"
           action="{!redirect}">
  <apex:detail />
</apex:page>
               

Devendra@SFDCDevendra@SFDC

Hi,

 

When overriding tabs with a Visualforce page, only Visualforce pages that use the standard list controller for that tab, pages with a custom controller, or pages with no controller can be selected.

 

So in this case, you need to remove standardController from <apex:page> tag and make your extension as controller.

saisaisaisai

Thanks for your quick reply Devendra.

I have tried this but it asks me to create a new controller, please let me know if you have any suggestions.:

 

<apex:page controller="Account"
extensions="overrideCon"
action="{!redirect}">
<apex:detail />
</apex:page>

 

Thanks

Sai

Devendra@SFDCDevendra@SFDC

Try this,

 

<apex:page controller="overrideCon" action="{!redirect}">
<apex:detail />
</apex:page>

 

public class overrideCon{
    // constructor
public overrideCon(){

} }

 

Matt WhalleyMatt Whalley
Wow, this hasn't been solved yet?  Anyways, you need a recordSetVar="" accounts in the apex:page tag.  That's all your missing.  Here's some more color on it: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_overrides.htm