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.
This component uses the force:recordData component and that component doesn’t support all Salesforce standard objects. For example, the Event and Task objects are not supported. For a list of supported objects, see the User Interface API Developer Guide.
|editFlowName||The 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.|
|deleteFlowName||The 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.|
|launchMode||Can be ‘Modal’ or ‘Modeless’. Modeless is the default. Modal only works on an edit and not on a delete.|
Version 1.2.1 Unlocked – 7/9/21 – Derek Camp, GearsCRM
Passes the recordId value to the Flow
Version 1.2 Unlocked 12/26/20
Changes referenced field name from Subject to Id
Version 1.0.0 Unlocked 8-29-20