Adding a Dashboard to a Visualforce Page
You can embed an Original Dashboard in a Salesforce.com page using Visualforce. The Infor Team recommends that you build a dashboard with a single dashlet if you intend to add it to a Salesforce.com page for the best presentation.
Prerequisites
Before configuring Salesforce, confirm the following prerequisites.
- Your Birst account must be associated with the Salesforce.com Organizational ID (SfdcOrgID). This is required only once per Birst account/SfdcOrgID pairing. See the Saleforce Help for finding the ID.
In the Birst Admin - Command Window enter:
addsfdcaccountmapping sfdcOrgID
If you think that the mapping has already been added, you can check it with this command:
getsfdcaccountmapping
See Administrative Commands. These are also available as web services. - Check the API Enabled check box in the Administrative Permissions of the Salesforce.com profile. This is required for a Salesforce.com user to access Birst from Salesforce.com.
Tip: You can also add a tab in Salesforce.com for a Birst dashboard.
To add an Original Dashboard to a Visualforce page
-
In Original Dashboards, navigate to the dashboard you would like to embed in the Salesforce.com page.
-
Click the gear icon at the top, then select Page Options - Get Links.
-
Copy the last link with the label: Appropriate for an Apex Control within Salesforce.
-
Log in to your Salesforce.com account.
-
Click your username at the top, then select Setup.
-
Expand Develop under App Setup on the left hand side, then click Pages.
-
Click the New button on the right side to create a new Visualforce page.
-
Next, give the new page a label and description then paste in the link you copied from the Links to the Dashboard Page dialog box into the Visualforce Markup area.
-
Modify the link you pasted in the Visualforce Markup area as follows:
In <apex:page standardController="<object>" showHeader="false" sidebar="false"> replace <object> with the apex object. For example: <apex:page standardController="Account" showHeader="false" sidebar="false">
In <apex:iframe height="<height>" width="<width>" replace <height> and <width> with the actual height and width you would like to use, for example: <apex:iframe height="300" width="400"
In birst.useSFDCEmailForBirstUsername=<true/false> replace <true/false> with true or false. For example: birst.useSFDCEmailForBirstUsername=false
Example:
<apex:page standardController="Account" showHeader="false" sidebar="false">
<apex:iframe height="300" width="400" src="https://rc.birst.com/AppExchangeSSO.aspx?serverurl={!$Api.Partner_Server_URL_250}
&sessionid={!$Api.Session_ID}&birst.hideDashboardNavigation=true&birst.hideDashboardPrompts=true&birst.useSFDCEmailForBirstUsername=true
&birst.module=dashboard&birst.spaceId=0108c657-bcad-43a9-8a71-38568ce700f9&birst.dashboard=Categories&birst.page=Page
&Products.CategoryName={! account.name}"/>
</apex:page>
Tips:
- See SSO Parameters for a complete list of parameters that can be used.
- In the example birst.hideDashboardNavigation and birst.hideDashboardPrompts are set. This makes for a cleaner look when the dashboard is embedded in a Salesforce.com page.
- The value for standardController defines the SFDC object type that this page can be associated with (in this example, the Account type).
- In this example, a prompt value (Products.CategoryName) is set to a variable associated with the object type specified in the standardController attribute on the apex:page tag. Refer to the Visualforce documentation for a list of variables.
-
Click the Save button at the top.
-
Click your username at the top, then select Setup. Expand Customize under App Setup, then expand the type used in the standardControllerattribute (Account in the example.)
-
Click Page Layouts, then click Edit next to the <Type> Layout page layout (for example, Account Layout).
-
Then click Visualforce Pages (as shown below).
- Drag the page you created (e.g., BirstDemo)
into the bottom area where you want it in the layout, then click Save.
- Select the page type (for example, Accounts)
then click on a individual type to see the result. The
dashboard should be displayed
on the page in the area you specified.
Tip: If you have hooked up one of the variables in the type to the embedded page via prompts (as in the example code) you will see changes as you go to different instances.
Setting up Single-Sign-On (SSO)
Adding a Tab for
Birst in Salesforce.com
SSO Parameters