Salesforce and Application Integration > Customizing Salesforce > Creating a Button or Link to Launch a Guide
  

Creating a Button or Link to Launch a Guide

This topic describes how to create a button or a link that launches a guide from a Salesforce object. The steps for doing this are:
  1. 1Create a Visualforce page.
  2. 2Update the Visualforce page's security settings.
  3. 3Create a button (or link) for the desired Salesforce object.
  4. 4Add the button (or link) the object's page layout.
An example is used to show these steps. In this example, a button is added that launches the Handle Case guide. Here is the General tab of the Guide Properties dialog for this guide:
Guide Properties General tab, Handle Case

Creating a Visualforce Page

Set the Visualforce Markup to:
<apex:page standardController="Case">
<icrt:AeSalesGuides guideName="Handle Case" objectType="Case"
objectId="{!Case.Id}" height="600px"/>
</apex:page>
Note: Make sure that the guide's Name value here matches the name set in the Guide Properties dialog.
Visualforce Page

Update the Security for the Visualforce Page

Click the Security link for the page you just created:
Visualforce Page, Security highlighted
Add one or more profiles displayed within the Available Profiles list to the Enabled Profiles list.
Enable Profile Acess for Visualforce Page
Save your changes.

Update the Page Layout

Select Cases | Page Layouts on the left. On the Case Page Layout page, click edit to display the page onto which you will be placing the button (or link).
Note: To add custom links to the page layout, select the Custom Links category on the palette and drag one or more custom links from the palette to the Custom Links section on the page layout.
Notice that Buttons is selected on the left, not Visualforce Pages, which is the entry after this one.
Case Layout page, placing a button
Save your changes.

Create a Button on the Salesforce Page

Within the Custom Buttons and Links area, press New to create a new button.
App Setup, Buttons and Links selected
Set the button's details similar to the following. Notice how Detail Page Button, Behavior, and Content Source are set. Content Source must be set to the Visualforce page that you created earlier.
New Button or Link page
Note: The way in which you create a link is similar; just select Detail Page Link instead of Detail Page Button and then use link in place of the button in the instructions that follow.

Launch the Guide

Open a case to see the newly added Handle Case button.
Showing button on a Salesforce page