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
Brendan LallyBrendan Lally 

Cannot assign a VF page to a button override on a custom object

as per VisualForce: Tabbed_Accounts_in_30_seconds
I am trying to override a standard button (within a custom object) to VF code I've created

When I pick the 'VisualForce Page' button within the override , nothing is available.
I have two VF pages.
I've tried both custom objects and std objects and no difference.

that one I want is called   cases_inner_tabs  and is setup in Develop/Pages
as  <apex: page standardController="Cases__c" showHeader="true" tabStyle="account" extensions="Cases_extn">

I had it used within a Web VF tab but no deleted that so 'Where is this used?' is now empty
If I go 2 my custom object  Cases and try and override its View button as a VF - its not there?


Why do they not show up ?
(on Developer account)

Brendan
Brendan LallyBrendan Lally
The custom object (Cases) is Managed-released and has a namespace (like all the rest of my custom objects)
Don't know if that makes any difference.

I tried an empty Apex page controller for another custom objects  called Products  that is not managed/released.

Page called  productTest

<apex: page standardController="Products__c">
</apex: page>

Tried to modify the standard button/links on custom object  Products and no VF pages are available

So still no closer.
Brendan LallyBrendan Lally
ok problem solved.
U need to have the full API name (with namespace prefix) in the controller class (and matches) for the VF pages to become available

So in this example I needed
apex: page standardController="myNamespacePrefix__Cases__c" >

Solved.
dchasmandchasman
Brendan,

You figured the workaround out before I saw your post - this issue is scheduled to be fixed in the next major salesforce.com release - after that fix is deployed you should not have to fully qualify the api name like this.


Message Edited by dchasman on 07-25-2008 07:27 AM
Brendan LallyBrendan Lally
Thanks Doug, Glad 2c someone was watching :) Even better that it will get fixed in next version Ta
Brendan LallyBrendan Lally
ok ....
went back 2 this as left 4 a few days and now can't seem 2 get it working at all!

What I said earlier doesn't seem 2 work.

If I try and prefix the table name with namespace prefix in my standard controller I get the following error.

Error: Unknown property 'myNamespacePrefix__Cases__cStandardController.Cases__c'

This is with the following line:
Code:
<apex:page standardController="myNamespacePrefix__Cases__c" >

 


If I have it as
Code:
<apex:page standardController="Cases__c" >

 

it saves fine but then doesn't show up as a valid VF page for button overrides on Cases custom object.

Whats bizarre is that on Products (mentioned earlier) it works fine and its VF page (just dummy) is
Code:
<apex:page standardController="Products__c">
</apex:page>

 

and it shows up as a valid VF override for buttons within Products custom object.

What am I missing?
Brendan LallyBrendan Lally
Anyone?

Doing a S-control redirect at the moment but messy.
EricDEricD
I am having the same issue, I cannot override the tab with a visualforce page.  It doesn't show up in the dropdown list.
 
Here is the code I have for the page:
<apex:page standardController="Engagement__c">
  <!-- Begin Default Content REMOVE THIS -->
  <apex:detail />
    <script language="javascript">
    function PopUpMsg()
    {
      alert("Please bill the project team");
    }
    window.setTimeout(PopUpMsg,2000);
  </script>
    <!-- End Default Content REMOVE THIS -->
</apex:page>
Brendan LallyBrendan Lally
seems similiar to other reported issues (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=4113&jump=true)

Lal