How to allow for a single approval from a group of approvers
In most of the Microsoft-provided documentation on workflow approval scenarios, Microsoft provides instructions on a single approver, multiple required approvers, or a hierarchical-approval structure. So far, none of the customers I’ve worked with on Microsoft Dynamics NAV workflow tasks have asked for these kinds of approval structures. In most cases, the structure requirement has been about the same: the event can be approved by any one of several supervising users, and once it’s been approved by any one of these users, the approval process is complete and no other pending approval entries should be left outstanding. We can refer to this as a single approval from a group of approvers.
Fortunately, this scenario is easily created by making some minor tweaks to the workflow templates that are available out-of-the-box in Dynamics NAV. For my example, I’ll be using the Sales Order Credit Limit Approval Workflow Template in Dynamics NAV 2017, but the tweaks I make to this specific template will work on other workflows as well. You’d just need to identify the corresponding events and responses and update them following the pattern outlined below.
I’ll start by (1) comparing screenshots of the out-of-the-box workflow template to my modified workflow, and identifying the changes needed to accomplish our single-approval scenario. I’ll then (2) walk through how the modified workflow works, using the different user accounts set up in my database. Lastly (3), I’ll outline all the prerequisite configurations that were needed for the modified workflow to work.
1. Standard Workflow Template vs. Customized Workflow
Workflow Template — Sales Order Credit Limit Approval Workflow:
The following screenshot shows the design of the out-of-the-box Sales Order Credit Limit Approval Workflow Template. The highlighted pieces identify where the template is located in Dynamics NAV and the Events and Responses that are modified in the single approval workflow we’re building.
Modified Workflow — Single Approval From a Group of Approvers:
The following two screenshots are taken from the workflow created via the “New Workflow from Template” function (copying the Sales Order Credit Limit Approval Workflow Template). The highlighted values are the Event and Response updates needed to meet our single-approver requirement.
If you’re building a workflow and are ready to start testing it, don’t forget to turn it on by putting a checkmark in the workflow’s Enabled field.
2. Workflow Walkthrough
One note before starting the walkthrough — Critical to all Dynamics NAV workflows are the various users and what approval permissions each user does or does not have. In my database I’ve set up four general users (named USER 1, USER 2, etc.), four approver users (named APPROVER 1, APPROVER 2, etc.), and one approval administrator (named APPROVAL ADMIN). In the example I walk through below, I use the USER 1 account for the person submitting the approval request, the APPROVER 1 account for the person approving the order, and the APPROVAL ADMIN account for monitoring the state of the workflow.
- USER 1 creates the Sales Order. The customer is over their credit limit, so the Sales Order will require approval before it can be released.
- USER 1 runs the Send Approval Request function. The customer is over their credit limit, so Dynamics NAV generates the approval request.
- After the approval has been submitted, the Sales Order Status has been changed to Pending Approval and there are five open Approval Entries, one for each of the four approvers and one for the approval administrator. These five Approval Entries were created based on the Workflow User Group that’s been assigned to the workflow.
- APPROVER 1 logs into Dynamics NAV and sees the pending approval in their Requests to Approve page. Note that all five of the approvers would see a similar pending Approval Entry on their Requests to Approve page at this point.
- The APPROVAL ADMIN user has access to see all the Approval Request entries. In the following case, we see that the five Approval entries are all listed as open, meaning that none of the approvers has approved the order yet.
- APPROVER 1 runs the Approve function on the Requests to Approve page, which removes the line from his page.
- The APPROVER ADMIN reviews the updated Approval Request entries. We now see that all the approval entries have Status values of Approved. This means that when the other approvers log into Dynamics NAV, they will not see any Approval entries waiting for their attention. Note: This is what the out-of-the-box workflow will not do. When the out-of-the-box Sales Order Credit Limit Approval Workflow Template is set up to use the Workflow User Group as its Approver Type, then all users listed in the Workflow User Group must approve the transaction independently. The additional Responses we added to the workflow make this modified template work according to our requirement.
- The Sales Order now has a Status value of Released, which is just what we wanted.
- Our test is a success because first, only one of the approvers needed to approve the order; second, there aren’t any approval entries outstanding on the other approver’s Requests to Approve page; and third, the order has a “released” status.
3. Prerequisite Configurations
Approval User Setup:
Workflow User Group:
The Workflow User Group is where all the approvers are defined. When a Workflow User Group is set up like shown below and the workflow’s Events and Responses are configured like outlined above, any one of the users in the Workflow User Group list can approve the event and no other approvals will be needed.