Configure a Component for Dynamic Interactions in the Lightning App Builder
It takes both admins and developers to make Dynamic Interactions work, but the keystone is a custom source component that defines the properties of the event to be triggered. Add event metadata and properties to your source component to expose the event to the Lightning App Builder, where an admin can then configure the targets and interactions for the event.
Only Lightning web components can be source components, but any component (Aura or LWC) can be a target. To expose an event from a source component, you fire a standard JavaScript CustomEvent in its .js file. To make the event discoverable, use Dynamic Interactions-specific metadata in the component js-meta.xml file, similar to how properties for builders are exposed.
For an overview of Dynamic Interactions, see Salesforce Help.
Note
Use Dynamic Interactions to Expose an Event
Dynamic Interactions uses two targetConfig subtags that you can put in your source component bundle’s componentName.js-meta.xml file to expose an event.
event
schema
These subtags are only available for a targetConfig with the target lightning__AppPage.
Note
Here’s a sample js-meta.xml configuration file for an Account List source component. It includes an itemselected event, and its schema includes apiName and recordId as defined in the .js file.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.