CRM Analytics Aura Events - Discover Event
This event sends a request to CRM Analytics dashboards to identify their assets.
The wave:discover event sends a global request to listening CRM Analytics dashboard assets to respond with their identifying information (via the wave:discoverResponse event). You can include your own parameter in the response.
The wave:discover and wave:discoverResponse events work hand-in-hand. They’re particularly useful for discovering when a dashboard is being added dynamically to the page, or whether the page has multiple dashboards.
Using the Developer Console, create an Aura component and copy the following markup into the component. The markup sets up the handlers for the events, and adds buttons for adding a dashboard and for discovering dashboards.
Add a controller to the bundle, then copy the following JavaScript into it. This code shows how to fire the discover event, and how to use the result when the discoverResponse event is fired. The code also shows how to create dashboard components.
That’s it! You can use these events to get some context about available dashboard components, and then interact with them via the Update and selectionChanged events.
For more information about Aura events and other Lightning development features, see the Lightning Aura Components Developer Guide.