Launch Screen Flows Automatically When a Record Changes with ‘Detect and Launch’ Page Component

Suppose you have a screen flow that you want to automatically launch whenever you’re on a record page and the record changes. Most likely, this will be because you just edited the record. As an example, suppose you want to make it so that every time a Case is edited and its priority changes, a screen flow runs that asks the user to provide some extra reasons if the priority has been raised to ‘High’.

This new DetectAndLaunch component makes this easier. It’s designed to sit invisibly on a page and listen for an event that gets fired by Salesforce when a record changes. Simply provide Detect and Launch with the name of the flow you’d like to run. As design, it will load the flow into a subtab if the app is in console mode, and a separate browser tab or page if the app is not in console mode.

Inputs

editFlowNameThe apiName of a flow you want to launch when the record is updated. Will work if this component is added to a record home page.
deleteFlowNameThe apiName of a flow you want to launch when the record is deleted. Will work if this component is added to a record home page.
launchModeCan be ‘Modal’ or ‘Modeless’. Modeless is the default. Modal only works on an edit and not on a delete.

Install

Version 1.1 Unlocked 9-6-20

Source

source

Old Versions

Version 1.0.0 Unlocked 8-29-20