Newer Version Available

This content describes an older version of this product. View Latest

Control a Flow’s Finish Behavior in a Lightning Component

By default, when a flow user clicks Finish, the component starts a new interview and the user sees the first screen of the flow again. However, you can shape what happens when the flow finishes by using the onstatuschange action. To redirect to another page, use one of the force:navigateTo* events such as force:navigateToObjectHome or force:navigateToUrl.

To control what happens when an autolaunched flow finishes, check for the FINISHED_SCREEN status.

Note

Example

This function redirects the user to a case created in the flow by using the force:navigateToSObject event.