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
venkyyyvenkyyy 

how many ways we have to tag a visualforce page to an custom object.?

Hi all,
i want to assign a visualforce page to a custom button, may i know what r the possibilites all we have in our SFDC, Explenation on each will help to me and to all as well... :)

Thanks in advance,
Venky.
James LoghryJames Loghry
If you want to attach a VF page as a custom button, you'll need to utilize the standard controller.  For instance, on an Account, your apex:page element would look like the following:
 
<apex:page standardController="Account">

If you need any custom logic, then you could implment it using an Apex extension class.
Deepthi BDeepthi B
Hello Venkyy
Inorder to add a VF page to a custom button, select any Sobject and create a button in it and then assign your VF Page to it as 'Detail Page Button'. One can add only VF pages to buttons that are with Standard Controller. Dont forget to add the button in the page layouts.
For further reference go through this link: https://developer.salesforce.com/docs/atlas.en-us.workbook_vf.meta/workbook_vf/overrides_3.htm

Or the way can be done by overriding the standard button with the VF page functionality. This can be done by:
Step1 :Create a VF page with a Standard Controller: 
<apex:page standardcontroller="Employee__c">
        //add your custom functionality
</apex:page>
Step2: Go to the detail page of your object and select Buttons,Links and Actions in the Related List.
          For suppose you want to edit the New(Standard Button Functionality) click on the edit option of New button and go with Override with VisualForce page and select your own VF page and your requirement will work. 
User-added imageUser-added image
 Please confirm if my post helped you.