Dynamic Interactions
Please refer to our Dynamic Forms and Dynamic Actions articles to have the full overview of these Salesforce features.
What exactly are Dynamic Interactions?
Dynamic Interactions are a new way to enable several components on the same Salesforce app page to interact with each other - previously, there was no easy way to make them talk to each other.
Dynamic Interactions start with developers who build the interactive components (anything on a web page users can interact with: a list, a data entry form, a chart, a map, and so on). Once created, Admins can dictate when components will react to different actions, such as when someone visiting the page clicks their mouse or presses specific buttons, and how the components interact with each other on a given page, all in the App Builder interface.
Long story short, to get the most out of Dynamic Interactions, developers and admins work together.
Building blocks
Event - anything that triggers an Interaction: mouse click, button, a change of value in a field
Interaction - an activity happening between Source and Target
Source - the item triggering the Event
Target - the item that gets the Interaction from the Source
Requirements and Limitations
Available in: Lightning Experience
Available in: Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions
supported only on app pages
Only LWC custom components can be source components, but any component present on the page (Aura or LWC) can be a target
Dynamic Interactions isn’t supported on pages based on custom page templates
Only String and Rich Text type properties can use expressions to define their values
The “required” property restriction isn’t respected when defining a new value for a target property in Dynamic Interactions, regardless of its type or whether it’s defined with an expression
Event
is the only context supported for expressions in interactionsYou can use expressions only for properties of type String, Integer, and Boolean
You can’t set a target property value as an array or list of values, such as a multi-select picklist
You can set a target property value of a String attribute to
empty
using Metadata API but not in the Lightning App Builder UIDynamic Interactions doesn’t work in the Mobile Only app in the Salesforce mobile app or in the legacy tablet mobile experience
When a dependent property is auto populated with a value based on a selection you made or a value you entered in another property, the auto populated value isn’t saved unless you “touch” the dependent property field by clicking into it or tabbing to it
Setting up Dynamic Interactions
From Setup, in the Quick Find box, enter App Builder, then select Lightning App Builder
Edit an existing app page, or click New to create one
In the Lightning App Builder, add a custom source component to your page.If you don’t have target components on your page, add those too
Click the source component on the canvas
In the properties pane, click the Interactions tab
Under the desired event, click Add Interaction. The properties pane changes to show you the interaction details
Select an interaction
Select the target component for the interaction. Components are listed with their region location to help you select the correct component when you work on pages with components spread across multiple regions
Configure the target component properties. When you select a target component, its properties appear in the Interaction Details pane. There you define the value that you want each target property to have when the interaction happens. If you leave a target property blank, its value remains unchanged when the event triggers
Save the page