Reply
Regular Visitor
bdyer_rovi
Posts: 2
0

Want to override standard button on Lead object with VF page

Hi,
I'm really new to SFDC and I'm trying to override the ChangeStatus button on the Lead object with a visualforce page. But, I can't get the VF page to display as an option to override the standard page.  The only option in the override of the button is for Custom S-Control;  Visualforce page isn't even an option.  What am I doing wrong?

 

Visualforce page markup:

<apex:page standardController="Lead" recordSetVar="leads" tabStyle="Lead">
    <img src="../s.gif" alt="Lead"  class="pageTitleIcon" title="Lead"/>
    <br />
    <h1 class="pageType noSecondHeader">Select New Status</h1>
    <apex:form >
        <apex:pageBlock title="Change Status">
            <apex:pageBlockSection >
                <apex:inputField value="{!lead.status}"/>
                <apex:inputField value="{!lead.Disqualification_Reason__c}"/>
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

Trusted Contributor
Tej
Posts: 172
0

Re: Want to override standard button on Lead object with VF page

 recordSetVar="leads" 

 

take off this tag in your apex:page component and try again, it will work.

Love Force

If it is the solution to your issue please mark it as a solution, so some body else can benefit.
Regular Visitor
bdyer_rovi
Posts: 2
0

Re: Want to override standard button on Lead object with VF page

Thanks for the response Tej.  I removed the recordSetVar="leads" and it is still unavailable.

I'm beginning to think that it's not possible to override the ChangStatus button with a VF page since it's not even listed as an option.

Trusted Contributor
Tej
Posts: 172
0

Re: Want to override standard button on Lead object with VF page

[ Edited ]

my bad, i thought u can't see the page in visualforce pages list.

 

i think the work around for this is , create a custom list button  from the search layout -- -> Edit Leads List view----> Create Custom list button -- with the same name as change status and add it to the Leads List View and uncheck the change status list button from leads list view.

 

The only draw back is it will appear last in the row after standard buttons.

 

Let me know if you still run into any issues.

Love Force

If it is the solution to your issue please mark it as a solution, so some body else can benefit.