Adding a Birst Dashboard to a Visualforce Page

This describes how to embed an Original Dashboard in a Salesforce.com page using Visualforce. Infor 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.

Before configuring Salesforce, confirm these 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 Salesforce Help (https://help.salesforce.com/s/articleView?id=000385215&type=1) for finding the ID. In the Birst Admin - Command Window, enter addsfdcaccountmapping sfdcOrgID.
    Note: If it is possible the mapping is already added, use this command to check: getsfdcaccountmapping. For the full list of commands, see Administrative Commands in the Birst Administrator guide. In addition, these are 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.
    Note: You can also add a tab in Salesforce.com for a Birst dashboard. See Adding a Tab for Embedding Birst in Salesforce.com
  1. In Original Dashboards, navigate to the dashboard you would like to embed in the Salesforce.com page.
  2. Click the gear icon at the top, then select Page Options > Get Links.
  3. Copy the last link with the label: Appropriate for an Apex Control within Salesforce.
  4. Log on to your Salesforce.com account.
  5. Click your user name at the top of the page and select Setup.
  6. Under the App setup on the left side, expand the Develop item and click Pages.
  7. To create a new Visualforce page,click the New button on the right side.
  8. Specify a label and description for the new page and then paste in the link you copied from the Links to the Dashboard Page dialog box into the Visualforce Markup area.
  9. Modify the link you pasted in the Visualforce Markup area shown here:

    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>

    • In the example, birst.hideDashboardNavigation and birst.hideDashboardPromptsare set. This provides 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.
  10. Click the Save button at the top.
  11. Click your user name at the top of the page and select Setup.
  12. Under the App setup on the left side, expand the Customize item and then expand the type used in the standardControllerattribute attribute. (Account in the example.)
  13. Click Page Layouts, then click Edit next to the <Type> Layout page layout (for example, Account Layout).
  14. On the left pane of the Layout page, click Visualforce Pages.
  15. Drag the page you created (e.g., BirstDemo) into the bottom area where you want it in the layout, then click Save.
  16. Select the page type (for example, Accounts), then click on an individual type to see the result. The dashboard should be displayed on the page in the area you specified.
    Note: If you have hooked up one of the variables in the type to the embedded page using prompts (as in the example code), you will see changes as you go to different instances.