You can create workflows that connect tasks in business processes that are performed by different users. You can include system tasks, such as automatic posting, as steps in workflows that are preceded or followed by user tasks. Requesting and granting approval to create new records are typical workflow steps.
On the Workflow page, create a workflow by listing the steps on the lines. Each step consists of a trigger and a response:
Note
If a business scenario requires a workflow event or response that is not supported in the default version, sign up for Power Automate. For more information, see Use Business Central in Power Automate Flows. Alternatively, get an app at AppSource or work with a Microsoft partner to customize the application code.
When you create workflows, you can copy the steps from existing workflows or from workflow templates. Workflow templates are non-editable workflows Business Central provides. The identifiers for workflow templates are prefixed with "MS-", such as in "MS-PIW". Learn more at Create Workflows from Workflow Templates.
Note
All notifications about workflow steps are sent through a job queue. Make sure the job queue reflects your business needs. Learn more at Use Job Queues to Schedule Tasks.
A workflow is divided into three sections:
The options for events and responses are system-defined. To add new options, you'll need to develop an extension.
Choose the icon, enter Workflows, then choose the related link.
Choose the New action. The Workflow page opens.
In the Code field, enter a maximum of 20 characters to identify the workflow.
To create the workflow from a workflow template, on the Workflows page, choose the New Workflow from Template action. Learn more at Create Workflows from Workflow Templates.
In the Description field, describe the workflow.
In the Category field, specify which category the workflow belongs to.
In the When Event field, specify the event that must occur to start the workflow step.
When you choose the field, the Workflow Events page lists all available workflow events.
In the On Condition field, specify one or more conditions that must be met before the event in the When Event field can occur.
When you choose the field, the Event Conditions page lists filter fields that can be conditions for the event. You can add new filter fields if you want.
If the workflow event is the change of a specific field on a record, use the Event Conditions page to select the field and the type of change.
In the Then Response field, specify the response that will follow when the workflow event occurs.
When you choose the field, the Workflow Responses page lists all available workflow responses and response options.
On the Options for the Selected Response FastTab, specify options for the workflow response by selecting values in the different fields that appear, as follows:
Note
These fields vary, depending on the response you've chosen.
Field | Description |
---|---|
Notify Sender | Specify whether to notify the approval requestor instead of the approval request recipient. If you select the checkbox, the Recipient User ID field is disabled because the requestor of the approval, the sender, will be notified instead. The name of the workflow response changes accordingly, to Create Notification for <Sender>. If the checkbox isn't selected, the name of the workflow response is Create Notification for <User>. |
Recipient User ID | Specify the user the notification must be sent to. Note: This option is only available for workflow responses with a placeholder for a specific user. For workflow responses without placeholders for users, the notification recipient is typically defined by the Approval User Setup. |
Notification Entry Type | Specify a trigger for the workflow notification. The trigger can be a record change, an approval request, or passed due date. |
Link Target Page | Specify the page that the link in the notification opens. The page must have the same source table as the record involved. |
Custom Link | Specify the URL of a link included in the notification in addition to the link to the page. |
To specify options for a workflow response that involves creating an approval request, fill the fields as described in the following table.
Field | Description |
---|---|
Due Date Formula | Specify the number of days the approver has to resolve the request. The period starts when the request is sent. |
Delegate After | Specify if and when an approval request is automatically delegated to the substitute. You can select to automatically delegate one, two, or five days after the date when the approval was requested. |
Approver Type | Specify who the approver is, according to the setup of approval users and workflow users. When the field is set to Salesperson/Purchaser, the user specified in the Salespers./Purch. Code field on the Approval User Setup page determines the approver. Approval request entries are then created according to the value in the Approver Limit Type field. Learn more at Set Up Approval Users. |
Show Confirmation Message | Specify whether to show a confirmation message after a user requests an approval. |
Approver Limit Type | Specify the effect of limits for approvers. An approver's approval limit must be above the value on the request. The following options exist:
|
To specify options for a workflow response that involves creating journal lines, fill in the fields as described in the following table.
Field | Description |
---|---|
General Journal Template Name | Specify the name of the general journal template that the specified journal lines are created in. |
General Journal Batch Name | Specify the name of the general journal batch that the specified journal lines are created in. |
Choose the Increase Indent and Decrease Indent buttons to indent the event name in the When field to define the step's position in the workflow.
Note
You can only change the indent of a step that doesn't have a subsequent step.
Repeat steps 7 through 11 to add more workflow steps, either before or after the step you've created.
Turn on the Enabled toggle to specify that the workflow will start when the event on the first step of type Entry Point occurs. Learn more at Use Workflows.
Note
Don't enable a workflow until you're sure it's ready.
Tip
To explore the relations between the tables used in workflows, choose the icon, then enter Workflow – Table Relations.
The following example creates a workflow to approve a change to the name of a vendor:
Choose the icon, enter Workflows, then choose the related link.
Choose the New action. The Workflow page opens.
In the workflow section, fill in the fields as described in the following table.
Field | Value |
---|---|
Code | VENDAPN-01 |
Description | Vendor Name Change Approval |
Category | PURCH |
To create the first workflow step, do the following.
In the next line, add a new workflow step for the An approval request is approved event.
In the next line, add a second workflow step for the An approval request is approved event.
In the next line, add a workflow step for the An approval request is delegated event.
In the next line, add a second workflow step for the An approval request is rejected event.
To enable the workflow, turn on the Enabled toggle.
The following illustration provides an overview of the result of this procedure.
Next, test the workflow by opening an existing vendor card and changing their name. Verify that an approval request is sent after changing the vendor name.