Attributes for the Lightning Web Component for Analytics Dashboards
The Lightning web component for CRM Analytics dashboards has attributes that can be set programmatically so you can create, render, and interact with a CRM Analytics dashboard on a page at runtime.
Name | Type | Required or Optional | Description |
---|---|---|---|
accessToken | string | Optional | A valid access token is obtained by logging into Salesforce. You need the access token if the dashboard is used by Lightning Out in a non-Salesforce domain. |
context | string | Optional | The context for the dashboard. |
dashboard | string | Required if developerName isn’t specified. | The unique ID of the dashboard. You can get a dashboard’s ID, an 18-character code beginning with 0FK, from the dashboard's URL, or you can request it through the API. This attribute can be used instead of the developerName , but it can't be included if the name has been set. Either the developerName or the dashboard attribute is required. |
dashboardExtendedMetadata | object | Optional | The extended metadata for the dashboard. |
dashboardMetadata | object | Optional | The metadata for the dashboard. |
developerName | string | Required if dashboard isn’t specified. | The unique developer name of the dashboard. You can request the developer name through the API. This attribute can be used instead of the dashboard ID, but it can't be included if the ID has been set. Either the developerName or the dashboard attribute is required. |
enableNotifications | boolean | Optional | Indicates whether users can set and manage notifications on widgets (true ) or not (false ). The default is false . |
enableSubscriptions | boolean | Optional | Indicates whether users can subscribe to widgets and manage their subscriptions (true ) or not (false ). The default is false . |
height | integer | Optional | Specifies the height of the dashboard in pixels. The default is 300. |
hideOnError | boolean | Optional | Indicates whether users see a dashboard that has an error (true ) or not (false ). When this attribute is set to true , if the dashboard has an error it doesn't appear on the page. When set to false , the dashboard appears but doesn’t show any data. An error can occur when a user doesn't have access to the dashboard or it has been deleted. The default is false . |
isLoaded | boolean | Optional | Indicates whether the dashboard is fully loaded on the page (true ) or not (false ). The default is false . |
openLocation | string | Optional | Specifies where the dashboard opens if the user chooses to launch the dashboard in its own page. |
pageId | string | Optional | If provided, this sets the initial dashboard page. |
recordId | string | Optional | The ID of the current entity in the context of which the dashboard is being displayed. |
showHeader | boolean | Optional | Indicates whether the dashboard displays a header bar that includes dashboard information and controls (true ) or not (false ). The header bar automatically appears when either showSharing or showTitle is true . The default is false . |
showSharing | boolean | Optional | Indicates whether to show the Share icon for a dashboard (true ) or not (false ). If true and the dashboard is shareable, then the dashboard shows the Share icon. To show the Share icon in the dashboard, the smallest supported frame size is 800x612 pixels. The default is false . |
showTitle | boolean | Optional | Indicates whether to show the dashboard's title above the dashboard (true ) or not (false ). The default is false . |
state | string | Optional | The state of the dashboard. The state includes any filters or selections that have been applied. See Filter and Selection Syntax for Embedded Dashboards. |
width | integer | Optional | Specifies the width of the dashboard in pixels. |
Here’s an example of a CRM Analytics dashboard component with most of the attributes specified. This example shows custom values overriding the default values.