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
MaggieSumitMaggieSumit 

how to link vf page with new button of Account page??

I want set my custom vf page with New Button which available on Account page any option.
ManojjenaManojjena
Hi Sumit ,

You need to create a VFpage where standardController should be Account .
After that any additional logic you need to put in your extension class .
Go to that button and edit it and select behaviour as you want .Then Content Souce you need to select Visual Force  page . Below that contect your VF page wil visible only when your standard controller is in which object your button is .
I think it wil help you .
Thanks
Manoj
Amit Chaudhary 8Amit Chaudhary 8
Please check below post
1) https://help.salesforce.com/HTViewHelpDoc?id=links_customize_override.htm
2) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_customize_override.htm



Click Edit next to the button or tab home page you want to override.
  1. Pick Visualforce Page as an override type.
  2. Select the Visualforce page you want to run when users click the button or tab.
  3. 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="Account" attribute on the <apex:page> tag:
<apex:page standardController="Account">
<!-- page content here -->
</apex:page>
When overriding tabs with a Visualforce page, you can select only Visualforce pages that use the standard list controller for that tab, pages with a custom controller, or pages with no controller.

When overriding lists with a Visualforce page, you can select only Visualforce pages that use a standard list controller.

When overriding the New button with a Visualforce page, you have the option to skip the record type selection page. If you choose this option, new records you create aren’t forwarded to the record type selection page. Salesforce assumes that your Visualforce page is already handling record types.
     4 Optionally, enter any comments to note the reason for this change.
     5 Click Save.

Please check below post with screen shot
1) http://www.salesforcetutorial.com/overriding-standard-new-button-vf-page/

Let us know if this will help you

Thanks
Amit Chaudhary
 
Mahesh DMahesh D
Hi Sumit,

Please find the below screen and visualforce page:

User-added image

Visualforce Page:
<apex:page standardController="Account" extensions="AccountExtensionController">

</apex:page>
Apex Class:
 
public class AccountExtensionController {

    public AccountExtensionController(ApexPages.StandardController controller) {

    }

}

Please do let me know if it helps you.

Regards,
Mahesh
Sourabh ShrivastavaSourabh Shrivastava
Hi Sumit,

In Setup under account tab, you can see button link and action.
click on  button link and action . You can see all buttons of account.
Now edit the new button choose VF page option and select your vf page and then save.
Now go to account. Click on new, it opens ur VF page.

I hope it solve your prob.

Regards,
Sourabh
MaggieSumitMaggieSumit
actually created a custom object and i want remove new button from that object
 
Amit Chaudhary 8Amit Chaudhary 8
Yes you can do that just follow same approch.

Step1 :- Create VF page StandardController
<apex:page standardController="CustomObject__c">
<!-- page content here -->
</apex:page>
Step 2 :- Go to custom object
Setup-->Object-->CustomObject

Step 3 :- click on Buttons, Links, and Actions

User-added image

Step 4:- Click on edit button in front of New And click on VF page and select your VF page

User-added image

Let us k now if this will help you

Thanks
Amit Chaudhary