Skip to main content

Prevent page close

Use the Prevent page close step to keep a page open that the user just tried to close, and tell them why. The flow ends here.

This step is only available in the Page Closed trigger, because that is the only flow that runs while a page is still open and still closable.

Typical use cases:

  • Keep an order open until a required reference is filled in.
  • Stop someone leaving a customer card with an incomplete address.
  • Hold a document open until a checklist the flow verifies is complete.

Configure the step​

Description​

A short label for the step, shown on the flow canvas.

Tell the user why​

On by default. Turn it off and the page simply refuses to close without saying anything – rarely kind, but reasonable when the page itself already makes the reason obvious (a red validation error the user can see).

Show as dialog​

On by default: the message is a dialog the user has to acknowledge before carrying on. Turn it off for a notification in the bar at the top of the page instead – quieter, and it works here precisely because the close was prevented, so the page is still open in front of them to read it.

Message​

What the user sees when the page refuses to close – tell them what to change, not just that something is wrong. SmartField placeholders are resolved before it is shown, so you can name the field or the record.

Required while Tell the user why is on.

Notes​

  • Put the step behind a Decision so it only runs in the case you care about. A flow that prevents unconditionally makes the page unclosable for everyone who opens it – unpublishing the flow releases it immediately.
  • An Error step also keeps the page open, but shows an error dialog instead of your message. Use this step when the user has something to fix, and Error when something genuinely went wrong.
  • The step only ever keeps a page open. If something else already decided the page should stay open, this step does not overrule it.
  • Once the user has dealt with the reason, closing the page works normally – the flow runs again and no longer reaches this step.