This project provides a custom approval workflow implementation in Microsoft Dynamics 365 Business Central.
It allows you to define and manage record approval processes with status tracking, workflow events, and styled UI indicators.
- ✅ Custom Approval Status Enum (
Open,Pending Approval,Released,Rejected) - ✅ Status field with color-coded UI styling (
StyleExpr) - ✅ Workflow integration using custom events
- ✅ Extensible enum for future statuses (e.g., On Hold, Escalated)
- ✅ Compatible with Business Central SaaS (Cloud)
Custom Workflow/
│── src/
│ ├── Codeunits/
│ │ └── CustomWorkflowMgmt.al
│ ├── Enums/
│ │ └── BankAccountStatus.Enum.al
│ ├── Pages/
│ │ └── CustomPageExt.al
│ ├── Tables/
│ │ └── CustomTableExt.al
│── app.json
│── README.md
- AL Language (Microsoft Dynamics 365 Business Central Extensions)
- Enums for approval status
- Pages & Page Extensions with Style Expressions
- Workflow Events & Codeunits
- Add the Status (Approval Status Enum) field to your custom table.
- Use
GetStatusStyleExpr()to display status with colors in the UI:- 🟢 Open → Favorable
- 🟡 Pending Approval → Ambiguous
- 🔵 Released → Strong
- 🔴 Rejected → Unfavorable
- Integrate with workflow subscribers to handle approval actions:
OnSendForApprovalOnApproveDocumentOnRejectDocument
procedure GetStatusStyleExpr(): Text
begin
case Status of
Status::Open:
exit('Favorable');
Status::Released:
exit('Strong');
Status::"Pending Approval":
exit('Ambiguous');
Status::Rejected:
exit('Unfavorable');
end;
end;- Clone this repository
- Open in Visual Studio Code with the AL extension
- Update app.json with your environment details
- Publish to your sandbox using
Ctrl+F5
This project is licensed under the MIT License – free to use and modify.
Developed by Premkumar R – Business Central Technical Consultant.
