What the extension registers
On install (and on every upgrade),Workflow Setup Event HAC (Codeunit 70003105) subscribes to four standard BC workflow events and adds:
Three workflow categories
| Code | Description |
|---|---|
OTJ | Overtime Journal |
SAD | Salary Advance |
LAP | Loan Application |
Three workflow templates
| Code | Description | Category |
|---|---|---|
OJ | Overtime Journal Approval Workflow | OTJ |
SA | Salary Advance Approval Workflow | SAD |
LA | Loan Application Approval Workflow | LAP |
Table-to-Approval relations
A relation between theOver Time Journal HAC table and the standard Approval Entry table is inserted, so that approval entries can be looked up from the document and vice versa.
Event-response predecessors
Five workflow events are registered for each of the three documents (send-for-approval, set-status-to-pending, cancel-all-approvals, open-document, create-approval-requests). This is the plumbing that lets the BC workflow engine know which response code to fire when one of the HR documents emits an approval event.When this runs
| Trigger | Behaviour |
|---|---|
| First install of the extension | All categories, templates, and event subscriptions are registered automatically |
| Upgrade to a new version | The Upgrade Codeunit HAC re-runs the install steps so any missing items are back-filled |
| New company created in an existing tenant | The OnInstallAppPerCompany trigger fires, repeating the registration |
Approval User Setup
The workflow templates are useless until you have at least one Approval User Setup record. This is standard BC, not part of the extension, but it is a hard prerequisite.- Open Tell Me → Approval User Setup.
- Click New and fill in:
- User ID — the BC user who can approve
- Approver ID — who approves on this user’s behalf when their own approval is needed
- Approval Administrator — tick for at least one user (often the HR manager)
- Salesperson Code / Substitute — optional
- Repeat for every user who will appear as an approver in HR workflows.
Linking the workflow to a user
Each HR document type also relies on the employee’s Direct Manager to know whom to route the approval to. Verify on every employee card:- Direct Manager is filled in.
- Related User is filled in — this is the BC user account that will receive approvals on the dashboard.
Troubleshooting
| Symptom | What to check |
|---|---|
| HR workflow templates don’t appear in Workflow Templates | Open Workflow Setup and click Recreate Approval Workflow Templates. The HR template registration runs again. |
| ”Approver ID must have a value” on send-for-approval | Approval User Setup is missing for that user — see above. |
| Document goes to approval but no notification appears | The approver’s Related User is blank on their employee card, or the approver isn’t logged into BC with the matching user ID. |
| ”You cannot create more than one workflow…” | A workflow with the same code is already active. Either edit the existing one or copy the template under a different code. |
| Approval cancels itself immediately | Conditions on the workflow exclude the document — open the workflow and review the When Event filter. |
Object reference
| Object | ID | Notes |
|---|---|---|
Codeunit Workflow Setup Event HAC | 70003105 | Registers categories, templates, table relations, event predecessors |
Codeunit ApprovalMgtHAC | — | Holds the HR-specific approval event codes (RunWorkflowOnSend…ForApprovalCode, RunWorkflowOnCancel…ApprovalRequestCode) |
Codeunit Install Codeunit HAC | 70003100 | Indirect — runs on install, doesn’t touch workflow itself but is the entry point |
Codeunit Upgrade Codeunit HAC | 70003101 | Indirect — runs on upgrade; workflow templates are re-inserted via the standard BC OnInsertWorkflowTemplates event |
Related pages
- Approvals — end-user walkthrough for setting up and running HR approvals
- First-Time Configuration — high-level setup overview

