Skip to main content

Documentation Index

Fetch the complete documentation index at: https://human-resource-docs.ha-consultancy.com/llms.txt

Use this file to discover all available pages before exploring further.

The extension hooks into BC’s standard Workflow framework to make three HR documents approvable: Overtime Journal, Salary Advance, and Loan Application. Everything below happens automatically — this page exists to demystify what was registered and to give you a checklist when something doesn’t appear where you expect it.

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

CodeDescription
OTJOvertime Journal
SADSalary Advance
LAPLoan Application
Categories are filters in the Workflow Templates page that let you find HR templates quickly.

Three workflow templates

CodeDescriptionCategory
OJOvertime Journal Approval WorkflowOTJ
SASalary Advance Approval WorkflowSAD
LALoan Application Approval WorkflowLAP
Templates are read-only blueprints. To use one, you select it from Workflow Templates and click New Workflow from Template — that copies it into the active Workflows list where you can edit conditions and approvers.

Table-to-Approval relations

A relation between the Over 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

TriggerBehaviour
First install of the extensionAll categories, templates, and event subscriptions are registered automatically
Upgrade to a new versionThe Upgrade Codeunit HAC re-runs the install steps so any missing items are back-filled
New company created in an existing tenantThe OnInstallAppPerCompany trigger fires, repeating the registration
You should never need to run this manually.

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.
  1. Open Tell MeApproval User Setup.
  2. 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
  3. Repeat for every user who will appear as an approver in HR workflows.
Without these records, sending a document for approval throws “Approver ID must have a value in Approval User Setup”.

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.
See Approvals for the end-to-end walkthrough.

Troubleshooting

SymptomWhat to check
HR workflow templates don’t appear in Workflow TemplatesOpen Workflow Setup and click Recreate Approval Workflow Templates. The HR template registration runs again.
”Approver ID must have a value” on send-for-approvalApproval User Setup is missing for that user — see above.
Document goes to approval but no notification appearsThe 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 immediatelyConditions on the workflow exclude the document — open the workflow and review the When Event filter.

Object reference

ObjectIDNotes
Codeunit Workflow Setup Event HAC70003105Registers categories, templates, table relations, event predecessors
Codeunit ApprovalMgtHACHolds the HR-specific approval event codes (RunWorkflowOnSend…ForApprovalCode, RunWorkflowOnCancel…ApprovalRequestCode)
Codeunit Install Codeunit HAC70003100Indirect — runs on install, doesn’t touch workflow itself but is the entry point
Codeunit Upgrade Codeunit HAC70003101Indirect — runs on upgrade; workflow templates are re-inserted via the standard BC OnInsertWorkflowTemplates event