Reassign in Acumatica 2023r1 Approvals

When it comes to approvals, most people take one of three choices for how to handle it. Approve it, reject it, or sit on it until someone complains. With Acumatica 2023r1, a fourth option has arisen… Pass the Buck! Ok, maybe that’s not the right way to look at it, but there really are reasonable causes for handing off an approval. What if a request has been assigned specifically to an approver, but the approver is on vacation?

From the release notes for 2023r1, a feature has been added to allow reassignment as shown below.

From the Acumatica 2023 R1 Release Notes

For more information about this feature, refer to the Acumatica 2023r1 Release Notes or contact your system administrator or trainer.

Upon review of the updated POOrderEntry_ApprovalWorkflow.cs file in the 2023r1 repository, custom approval screens need to be updated to support the new functionality. In the following code from the CMMS-Lite community project on GitHub, the WOOrderEntry graph’s approval graph extension has been updated. Look for the // START // and // END // tags outlining the added code to quickly identify the changes that need to be implemented in code.

In the code starting at lines 76 and 148, the action has been defined. In the section starting at line 76, the action is always hidden, so it is placed in the PredefinedCategory.Actions category. However, in the section starting at line 148, the action needs to be grouped in the approvalCategory created starting at line 119. If approve and reject are not using approvalCategory, be sure to update them in the Configure method to do so at lines 130 and 140. Also, remember to add the action to the screen configuration in lines 91 and 278. By defining the action with .CreateExisting(nameof(WOOrderEntry.Approval.ReassignApproval)… the work of the action is handled behind the scenes via EPApprovalAutomation used to create the Approval view in the graph.

The resulting approval change adds the Reassign action under the Approval Category when the record is pending approval.

Since Reassign interacts with the approver, a smart panel must be added to the screen to provide that interaction.

The resulting dialog box is shown below.

That’s it! Just publish the site to pick up the screen change, and approvals can be reassigned.

If the workflow hasn’t been updated to support the somewhat new feature for adding Approve/Reject Reasons, check out my post on adding that functionality to get caught up on approvals.

Happy coding!

Leave a Reply