Search
Close this search box.

Embedding Tableau Dashboards in Salesforce Records using Visualforce

This post will focus on using Visualforce to embed Tableau dashboard in Salesforce records. This method assumes you have already published your Tableau dashboard, and have some Salesforce development knowledge.

Embed and Filter Your Tableau Dashboard in Salesforce Lightning Experience Records
After you have published your Tableau Dashboard online,  go to your Salesforce org and do the following:

  • Create a new Visualforce page by navigating to Salesforce Setup, search for and open “Visualforce Pages”.
  • Click the “New” button, enter “SimpleEmbedTableau” for the name and check the box “Available for Lightning Experience, Lightning Communities, and the mobile app”.
  • Replace the placeholder code with the code below.
  • Navigate to your Tableau dashboard online and click the “Share” button.
  • Copy the value in the link field starting from https:// until the first “?”, but do not include the “?” in your selection.
  • Replace [URL FOR TABLEAU DASHBOARD] with the value you just copied. Save the Visualforce page.

Now we need to customize the sObject record page to show the dashboard.

  • Navigate to the sObject record in your Salesforce org to which this dashboard relates.
  • Click the gear icon in the top right and select “Edit Page”. This will open the Record Page editor in the Lightning App Builder.
  • Click the Tabs (1) component, then the Add Tab (2) button. Select “Custom” (3) for the Tab Label and enter “Tableau” for the Custom Tab Label (4). 
Click to view larger
  • Click the Tableau tab, then drag the Visualforce component from the list of Lightning Components onto the page.
  • In the right pane, select “SimpleEmbedTableau” for the Visualforce Page Name and leave the Height blank to use the default height set by the Visualforce page.
  • Save the Record Page and then view the record to see the filtered dashboard.

That’s it! Happy embedding!