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
SeanSeeSeanSee 

How can I use a VisualForce page on a custom object

I have created a VisualForce page that I would like to use on a custom object I've built.  I am trying to set it so that whenever someone enters a new record or whenever a record is edited, the new VisualForce page with graphics will display.  On the page I have it set to use the Custom Accountability controller with:

 

 

<apex:page standardController="Accountability__c"   RecordSetVar="Accountability">
<apex:variable value="{!Accountability__c}" var="acc"/> 
    <apex:form >

 

<apex:page standardController="Accountability__c" RecordSetVar="Accountability">

<apex:variable value="{!Accountability__c}" var="acc"/>     

<apex:form >

 

Can anyone please tell me what I am doing wrong and I how I can over ride the standard view with my custom one.

 

Thanks so much,

 

Sean

bob_buzzardbob_buzzard

You'll need to override the new and edit buttons to direct the user to your visualforce page.

 

On the setup page for the object, navigate to the Standard Buttons and Links section, click the edit link next tot the New button and choose your visualforce page.  Repeat for the Edit button.

SeanSeeSeanSee

I've tried doing that but everytime I go to override the buttons there are no visualforce pages listed in the drop down box. I have been able to do this for an opportunity page in the past and had no trouble but now there appear to be no visualforce pages available

jwetzlerjwetzler

Using recordSetVar signals that you want to use the standard list controller, in which case you can only override the main Tab for your object, since that's the only view that involves a list of multiple objects.  If you are only trying to work with only one record of your custom object you should not be using recordSetVar.