Confirm dialog
Use the Confirm dialog step to ask the user a yes/no question and take a different path depending on their answer. It works like the Decision step, except the answer comes from a person instead of from a condition.
The step is available in every flow. It asks when the flow runs in front of a user – for example in the interactive page triggers Page Opened and Page Closed, or in Document Released and Document Posted, where the question comes before the release or posting starts. When the same flow runs in the background – for example after you start it with Start Flow, from the flow card or the Flow Workspace – the question waits for an answer from you or from anyone who opens the execution. Only when nobody answers in time does the step do what you set under Without a user interface.
Typical use cases:
- On closing a document: "You have not released this order. Leave anyway?"
- On opening a customer card with overdue payments: "Continue to this customer?"
- Before the flow does something the user should agree to: "Copy last year's prices onto this quote?"
- On releasing an order over the customer's credit limit: "Credit limit exceeded. Release anyway?" – on No, end the path with an Error step and the release is cancelled.
Configure the step
Description
A short label for the step, shown on the flow canvas.
Question
What the user is asked. SmartField placeholders are resolved first, so you can put the record's own values into the question – the document number, the customer name, an amount.
A question is required.
Default answer is Yes
Preselects Yes in the dialog, so pressing Enter accepts. It only affects the dialog itself.
Wait for an answer (minutes)
How long the question waits when the flow runs in the background. Default 5, at most 15; 0 means the step does not wait.
While the question waits, it is asked:
- in the wait dialog of the user who started the flow (Start Flow, flow card, Flow Workspace). The usual Yes/No question appears on top of the dialog, and the flow continues along the path of the answer a moment later.
- on the execution card – anyone who opens the execution while the question waits is asked. If you dismiss the question, use Answer question on the card.
The first answer counts; the execution log notes the answer and who gave it, and that the question was waiting until when. A flow that is waiting for an answer shows as running.
A flow that runs through the API or a web service without a user interface does not wait: nobody could answer before the call times out. The step then applies Without a user interface at once.
Without a user interface
What the step does when the flow runs without a user interface and nobody answered within the waiting time (or the step does not wait):
- Raise an error (the default for a new step) stops the flow with an error that names the question. Use it when neither answer is safe to assume.
- Answer Yes continues along the Yes path.
- Answer No continues along the No path.
When the step answers on its own, the execution log records that it did so without asking. Confirm dialog steps created before this setting existed keep their earlier behaviour: they answer Yes if Default answer is Yes was on, and No otherwise.
Yes label / No label
Names for the two paths on the canvas. They do not change the dialog's buttons, only how the branches read in the editor.
Put it before any step that writes
Business Central will not open a dialog once a flow has written something to the database. In practice that means: ask first, then act. A Confirm dialog placed after an Insert, Modify, Delete, Rename, Set field values, Item tracking, Dimension or number-series step fails at the moment it tries to ask.
AutoFlow warns about this when you publish, naming the writing step it found ahead of the question. The warning does not block publishing – it cannot always tell whether the two are really on the same path – but it is worth acting on.
The same applies to flows started by Record Created or Modified and by the record triggers Global Insert, Global Modify and Global Delete: they run while the record is still being saved, so Business Central opens no dialog there. When a user triggers such a flow, it fails at the Confirm dialog. It only works when the record is changed in the background, where the Without a user interface answer applies. AutoFlow warns about this when you publish, too.
Notes
- The flow waits while the dialog is open, and the flow timeout keeps running. Keep confirm dialogs near the start of short flows.
- If the user closes the dialog with the window's X instead of answering, Business Central treats that as No.
- A document can also be released or posted without anybody at the screen – through the API, by batch posting in the background or by the job queue. Then nobody is asked and the step follows the Without a user interface setting.
- To tell the user something without asking anything, use Send Notification instead.