getState
Method
Use the getState
method to retrieve the current state of the rendered Aura component for CRM Analytics dashboards.
Argument Name | Description |
---|---|
config | The configuration for the getState call. This value is a JSON object that sets parameters for the call. For getState , the config is {} . |
callback | The callback function to handle the getState payload response. See the next section for a basic callback example. |
Payload attributes | Description |
---|---|
pageId | The current pageId of the dashboard. |
state | The dashboard state. The state contains datasets , sObjects , sourceObjects , and steps . |
Add your implementation of the getState
call into the controller.js for your Aura component.
In this example, the callback
function handles success and error responses by setting component attributes with the response result. The getState
result is passed to the component’s dashboardState
attribute as a JSON string.
The callback result contains the payload with the pageId
and the state
attributes. Here’s a sample callback result.
See Also