Activity Forums Salesforce® Discussions What must the Controller for a Salesforce VF page utilize to override the Standard Opportunity view button?

  • Abhinav

    Member
    September 15, 2016 at 5:05 pm

    Hi Pranav,

    This will lead to a lot of conditionally rendered tags. You might consider having separate page for "view" and separate for "new/edit" but use same controller extension if you really want.

    New: /apex/override?retURL=%2F006%2Fo&save_new=1&sfdc.override=1
    View: /apex/override?id=0067000000AH3ME&sfdc.override=1
    Edit: /apex/override?id=0067000000AH3ME&retURL=%2F006%3Ffcf%3D00B70000005pFQv%26rolodexIndex%3D-1%26page%3D1&sfdc.override=1

     

  • saloni gupta

    Member
    July 25, 2017 at 6:44 am

    Hi Adarsh,

    You can refer this link

    "When overriding buttons with a Visualforce page, you must use the standard controller for the object on which the button appears. For example, if you want to use a page to override the Edit button on accounts, the page markup must include the standardController="Opportunity" attribute on the <apex:page> tag"

  • zhang

    Member
    December 12, 2018 at 1:34 am

    Hi, saloni,I am confused about the example. To override the Edit button on accounts, why must include the standardController="Opportunity", not the standardController="Account"?

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Integration Tutorial | Integrate Salesforce with Apps

Video in

This "𝐒𝐚𝐥𝐞𝐬𝐟𝐨𝐫𝐜𝐞 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧 𝐓𝐮𝐭𝐨𝐫𝐢𝐚𝐥" video by Edureka will help you understand what is Salesforce integration in detail. It will also address the various Salesforce integration…