Thursday, 6 September 2012

Create a Button that Links to a Visualforce Page - Visualforce


Pages like the standard account detail page have buttons, such as Edit and Delete. You can add a new button here that links to your page.
  1. Click Setup | Customize | Accounts | Buttons and Links.
  2. In Custom Buttons and Links, click New.
  3. Enter MyButton for the Label.
  4. Enter My_Button for the Name.
  5. For the Display Type, select Detail Page Button.
  6. Select Visualforce Page in the Content Source picklist.
  7. In the Content picklist that appears, select your accountDisplay page.
  8. Click Save.
    A New Button Creation Page
  9. Now that you have your button, you need to add it to a page layout. Repeat the process from Step 2: Embed a Page on a Standard Layout but, instead of selecting a Visualforce Page, add a Button, and select MyButton.
    Note
    Depending on your browser settings, you might get a privacy warning—simply allow your browser to load pages from the Visualforce domain to avoid these warnings.
You can use a similar procedure to create a link, instead of a button, and you can add many buttons and links to standard and custom pages to create just the right navigation and user interface for your app.

No comments:

Post a Comment