Microsoft Dynamics 365 Business Central offers built-in approval workflows for purchase orders, sales documents, and financial journals. However, it does not include a standard approval process for project records (Jobs). For organizations with strict governance requirements, this creates an operational gap when initiating a new project.
To solve this, our team at Cherrie Business Solutions designed a custom Project Approval Workflow that connects Dynamics 365 Business Central with Microsoft Power Automate using External Business Events.
How the Custom Workflow Operates
This integration allows users to submit new project requests directly within the Business Central interface.
Once a project is submitted, Business Central triggers an External Business Event. Power Automate captures this event and manages the rest of the process, automatically notifying the assigned approvers. Whether your company uses a simple single-level approval or a complex, multi-level hierarchy, the workflow adapts to your internal policies.
Core Features & Capabilities
-Custom project approval process for Business Central Jobs.
-Integration with Microsoft Power Automate using External Business Events.
-Automated approval notifications are sent to designated approvers.
-Support for multi-level approval workflows.
-Real-time approval status updates within Business Central.
-Flexible approval routing based on organizational policies.
-Improved project governance and compliance controls.
The Business Impact
Proceeding with unapproved projects can drain resources and create unnecessary risks. By implementing an automated approval process, organizations eliminate the risk of unauthorized project creation and improve team accountability.
Instead of relying on manual email follow-ups, the decision-making process becomes much faster. By combining the financial capabilities of Business Central with the automation of the Microsoft Power Platform, organizations gain a scalable framework that improves project governance without slowing down daily operations.
Business Requirement
Organizations wanted:
-
Approval before project execution
-
Email notifications to approvers
-
Configurable multi-level approval hierarchy
-
Audit trail of approval requests
-
Low-code integration with Power Automate
Since standard project approvals were unavailable, a custom solution was developed.
Solution Architecture
User Clicks "Send for Approval"
¦
Job Status changes to Planning
¦
Event Subscriber detects status change
¦
External Business Event publishes payload
¦
Power Automate Flow is triggered
¦
Approval Email sent to Approver(s)
¦
Multi-Level Approval Process begins
Step 1 – Sending the Project for Approval
When the user clicks Send for Approval, a new approval request record is created and the project status is updated.
Key Responsibilities
-
Validate no approval is already pending
-
Create approval request record
-
Determine first approver
-
Set approval status
-
Change Job Status to Planning
-
Trigger integration event
Code Snippet
// Update Job status
JobRec."Proj.Approval Status" :=
JobRec."Proj.Approval Status"::WaitingForApproval;
// Update Job version
JobRec.ProjAppvdVersion := NextVersionNo;
// Change Job status
JobRec.Status := JobRec.Status::Planning;
JobRec.ReqUserID := UserId();
JobRec.ReqDate := CurrentDateTime();
JobRec."Apprv.Pending From" := Firstapprover;
JobRec.Modify(true);
Explanation
Once approval is requested, the project is immediately moved into the Planning status. This status acts as the trigger point for downstream integrations and ensures project execution cannot proceed without the required approvals
Step 2 – Event Subscriber Monitoring Status Changes
To monitor project status changes, an Event Subscriber is attached to the Job table.
Code Snippet
[EventSubscriber(ObjectType::Table,
Database::Job,
OnAfterValidateEvent,
Status,
false,
false)]
local procedure OnAfterValidateEventStaus(
var Rec: Record Job;
var xRec: Record Job;
CurrFieldNo: Integer)
begin
if Rec.Status <> xRec.Status then begin
// Additional logic can be executed here
end;
end;
Explanation
The subscriber listens for modifications to the Status field and provides a centralized location for reacting to project lifecycle changes.
Step 3 – Publishing an External Business Event
One of the most powerful features of this solution is the use of External Business Events.
Instead of making direct API calls, Business Central publishes a business event that Power Automate can subscribe to.
Code Snippet
This should definitely be included in the blog.
[ExternalBusinessEvent(
'JobStatusChange',
'Job Status Change',
'This business event occurs when job status changes',
EventCategory::System)]
local procedure JobStatusChange(ProjectCode: Code[20]; ProjectName: Text[100]; RequestedBy: Text[50]; ApprovalUrl: Text[250]; Approver: Text[20]; ApproverMail: Text[100];PendingFrom: Text[50];CC1: Text[100];CC2: Text[100];FromMail: Text[100])
begin
// Event declaration only
end;
Why External Business Events?
Benefits include:
-
Native Business Central integration
-
No custom API endpoints
-
Loose coupling between systems
-
Real-time notifications
-
Easy Power Automate connectivity
Step 4 – Triggering the Business Event
After determining approvers and email recipients, the event is raised with all necessary information.
Code Snippet
JobStatusChange(JobRec."No.", JobRec.Description, UserId(),BaseUrlRec."Base URL",RecUser."User ID",
RecUser."E-Mail", Firstapprover, CC1Mail, CC2Mail, SenderMail);
Step 5 – Power Automate Integration
Power Automate subscribes to the Business Central business event.
When the event is received:
-
Payload is captured.
-
Project details are extracted.
-
Email notification is generated.
-
Approver receives a request to review the project.
Step 6 - Multi-Level Approval Support
The solution was designed with scalability in mind.
Approvers are maintained in a custom configuration table:
ApprovalConig.SetCurrentKey("Sequence");
ApprovalConig.Ascending(true);
This allows organizations to define: Sequence 1 Project Manager, Sequence 2 Finance Manager
As each approval stage completes, the workflow can move to the next configured approver.
Advantages
-
No code changes required
-
Configurable approval hierarchy
-
Supports enterprise governance requirements
Benefits of the Custom Solution
1. Project-Specific Approval Process
Provides approval controls for Job records where standard workflows are limited.
2. Event-Driven Architecture
Uses Business Events instead of tightly coupled integrations.
3. Low-Code Automation
Power Automate handles notifications without custom middleware.
4. Multi-Level Approvals
Supports configurable approval chains.
5. Better Auditability
Tracks:
-
Requested By
-
Request Date
-
Current Approver
-
Approval Version
-
Approval Status
6. Future Extensibility
The same event can later be used for:
-
Microsoft Teams notifications
-
Adaptive Cards
-
Mobile approvals
-
External approval portals
-
Approval analytics dashboards
Conclusion
By combining Microsoft Dynamics 365 Business Central External Business Events with Power Automate, it is possible to build a flexible and scalable project approval framework without custom web services or middleware.
