Table of Contents

Search

  1. Preface
  2. Salesforce Managed Package
  3. Running a Guide within a Salesforce Organization
  4. Techniques
  5. Customizing Salesforce
  6. Mobile Guides
  7. Meeting Follow-up Wizards
  8. Controlling Who Sees Guides
  9. Launching a Guide
  10. Guide Execution Reports

Salesforce and Application Integration

Salesforce and Application Integration

Customizing and Creating Salesforce Pages

Customizing and Creating Salesforce Pages

You can use Visualforce page definitions for most of the common Salesforce objects. However, you may use other objects from which you want to launch guides or you may create your own. This topic discusses how to create and use a Visualforce page. This example will use the CampaignMember object. This process is straight forward and only contains three steps. If you are using version 27 of the Salesforce API, please read the note at the end of this topic.
Note
: See Adding Guide Areas to Salesforce Pages for a more complete discussion as this section omits some of the details shown there.
  1. Create the Campaign Member Sales Visualforce Page. The markup you will add is:
    <apex:page standardController="CampaignMember"> <icrt:AeSalesGuides objectType="CampaignMember" objectId="{!CampaignMember.Id}"/> </apex:page>
    Customizing a Salesforce page
  2. After you save the Visualforce Page, edit the page layout for the Campaign Member:
    Campaign Member Page Layout
  3. Add the new page to a section in the page layout:
    Campaign Member Page Layout, adding a new page
Salesforce API, Version 27
If you are using version 27 of the Salesforce API and are creating a Visualforce page to embed an
AeSalesGuides
Visualforce component using code similar to the following:
<apex:page standardController="Account"> <c:AeSalesGuides objectType="Account" objectId="..."/> </apex:page>
Salesforce displays the following error:
Error: <apex:attribute assignTo> cannot be same as the <apex:attribute name> ( objectId )
This error prevents you from creating new Salesforce pages that have guides.
Compile-Time Checking for Custom Component Attribute Names:
In the Spring '13 release, there is a new compile-time check that prevents giving custom Visualforce component attributes the same name as the assignTo value (which can refer to a property or method in the component's controller). This checking prevents a number of programming errors (bugs) that can result in runtime errors. This change is versioned, and you must update your Visualforce components and the pages that contain them to API version 27.0 to enable the new behavior. Previously, it was possible to create a custom component with an attribute that had the same name as the
assignTo
value.
For example:
<apex:component> <apex:attribute name="currentpagename" type="string" assignTo="{!currentpagename}" description="This component can't be saved."/>
This component is no longer allowed.
</apex:component>
Force.com Visualforce
:
To make this component compile under API version 27.0, change either the attribute name or the assignTo value (which might require you to also change a controller method or property). For example:
<apex:component> <apex:attribute name="thepagename" type="string" assignTo="{!currentpagename}" description="This component saves just fine."/> This component is OK! </apex:component>
Note
: Both components, as well as the pages they are displayed on, must be updated to API version 27.0 to enable the new compile-time check.

0 COMMENTS

We’d like to hear from you!