getState Method

Use the getState method to retrieve the current state of the rendered CRM Analytics dashboard.

Argument NameDescription
configThe configuration for the getState call. This value is a JSON object that sets parameters for the call. For getState, the config is {}.
callbackThe callback function to handle the getState payload response. See the next section for a basic callback example.
Payload attributesDescription
pageIdThe current pageId of the dashboard.
stateThe 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