0

I have a screen flow that checks for a decision and based on the decision it shows the respective screen. When I select an option, it properly navigates to the next screen. However when I click on FINISH in the last screen it looks back to the first screen of the flow.

I am calling the flow via lightning component embedded in a quick action modal.

4
  • Can you confirm how is this flow called? Can you check debugging if the flow is again called Mar 13 at 8:48
  • @SaiPraveenKakkirala Flow is called from a lightning component using lightning:flow. When I debug from the flow window it works fine. Mar 13 at 8:48
  • When embedded in a page or other component that doesn't actually close the flow, flows automatically restart. This is standard behaviour. You need to make sure your component listens for a state change from the flow it started and hides the flow again on finish.
    – Phil W
    Mar 13 at 8:56
  • @PhilW I am calling this flow using Standard Quick Action and overriding its lightning component that in turn calls flow using. lightning:flow. Do you mean that is this scenario also it will automatically restart? Ideally the flow is embedded on the quick action modal. Mar 13 at 9:00

1 Answer 1

4

When you have a component that uses lightning:flow, it is your responsibility to ensure that you "close" the flow UI when the user presses Finish.

This is covered in the documentation and I've reproduced it here for clarity:

Each flow component includes navigation buttons (Back, Next, Pause, and Finish), which navigate within the flow. By default, when the flow finishes, the component reloads the first screen for a new interview. To customize what happens when the flow finishes, add an event handler for the onstatuschange action when status contains FINISHED. For an example, see Control a Flow’s Finish Behavior in a Lightning Component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.