Automation: Auto Refresh in custom flows
This page covers:
How to add AutoRefresh to your custom flows
Auto refresh will work only for the below LWCs
ManageIndicators
AddResults
ManageLogFrames
SetTargets
ActivityTracking
SubmissionResponseForm
In your custom flow, click on Toggle -> New resource -> create a variable “recordId” , Data type = text. Mark “Available for input” checkbox as TRUE and click save.
Add a screen element -> search for “fireAutoRefreshEvent” component and drag and drop it on the screen; Or add it to your current screen.
Click on the component and fill the fields on the right side i.e API name, Component names, host record Id.
Component name: Name of the LWC component you wish to refresh; Add the exact component name mentioned in the note above.
If you need to use multiple LWCs, then use comma(,) as a separator.
Host record ID: select the variable we created in step 1.
There MUST be a screen/element after the “fireAutoRefreshEvent” component. If “fireAutoRefreshEvent” component is the last screen in the flow, below error will be displayed.
The FireAutoRefreshEvent is a Lightning Web Component (LWC) designed to be used in Screen Flows. It cannot be called directly in Record-Triggered Flows, as Record-Triggered Flows do not support user interface components like LWCs.