D365 Business Central : Setup Multiple Approval Administrators
Approval Administrator is a user with special permission to oversee and manage the approval process within the system. The user can perform specific approval-related actions that others cannot, such as delegating or deleting overdue approval requests. You can assign the role of Approval Administrator under the Approval User Setup.
By default, Dynamics 365 Business Central allows only one user to be assigned the role of Approval Administrator. Attempting to assign this role to more than one user triggers an error.
While we can work with the limitation, there are certain cases where it is beneficial to have more than one Approval Administrator. In this blog post, we’ll explore two methods to bypass this limitation and set up multiple Approval Administrators: one through development using custom code and the other by leveraging the Configuration Package.
Disabling Validation using Custom Code
Looking under the field validation of Approval Administrator, we can see the logic to prevent multiple Approval Administrators. To bypass the system limitation, we can use a simple approach by subscribing to the OnBeforeValidateApprovalAdministrator
event using custom code.
codeunit 60241 "Subs Multi Approval Admin_TNG"
{
[EventSubscriber(ObjectType::Table, Database::"User Setup", OnBeforeValidateApprovalAdministrator, '', false, false)]
local procedure UserSetup_OnBeforeValidateApprovalAdministrator(var IsHandled: Boolean)
begin
IsHandled := true;
end;
}
By publishing this code as an app, the system will no longer prevent assigning the role of Approval Administrator to multiple users.
Nice and simple. You can get this free app under my App-Release.
Bypass Validation using Configuration Package
Another method involves using the Configuration Package to bypass the validation.
Navigate to Configuration Packages page and create a new one.
Add Table 91: User Setup and drill down to No. of Fields Available
Remove all fields using Clear Included. Click Edit List, enable the Approval Administrator field, but disable the validation.
Export the package to Excel, modify the value for the Approval Administrator field to true
. Import the modified Excel file back into the system and apply the package.
Conclusion
Both methods above provide a workaround to the limitation of having only one Approval Administrator. While they have been used successfully without issues, it’s important to note that these approaches involve bypassing the system limitation and may carry some risk of creating bugs. So use these methods at your own risk, and ensure thorough testing in a controlled environment before applying them to a production system.