Example 12
Type: Advanced Approval Process Workflow
Department: Payables
Learning Objectives
Decision
It is possible to lodge a decision as an option to a To-Do and as soon as an employee who is responsible for this decision has made the decision, the To-do is completed by default. Next steps in the work process will be activated depending on the decision which had been made.
Business Process “Payment Approval”
Payments of over 1000 Euro are checked and possibly approved by the Accountant and then can be paid by the Secretary afterwards. In addition, an inquiry of payment decisions in a different currency will be sent to the Financial Manager for approval or rejection.
Aptean Advanced Workflow Setup
Reference Type
No.: 81 (Gen. Journal Line)
Buffer Time on Function Call Server: 30 Seconds
Automatic Workflows: Yes
Keyword Definition Lines
Tick all Use Fields.
Table ID: 81 (Gen. Journal Line)
Tick all Use Fields
Keyword Definitions Line 1
Field ID: 4 (Account No.)
Keyword Definitions Line 2
Field ID: 11 (Bal. Account No.)
Keyword Definitions Line 3
Field ID: 13 (Amount)
Keyword Definitions Line 4
Field ID: 12 (Currency Code)
To-Do Template
To-Do Template 1 | Reference Type No: 81 (Gen. Journal Line) Code:WF120-TD010 Description: Approve Payment |
---|---|
WHO | Employee Code: GS Conditional Responsibility based on Currency Code Conditional Responsibilities Conditional Responsibilities Line 1 Condition Code: WF120-C010 Condition Table ID: 81 (Gen. Journal Line) Code: WF120-C010 Description: Currency Type: Responsibility Condition Line 1 Active: Yes Type: Field Table ID: 81 (Gen. Journal Line) Field ID: 12 (Currency Code) Filter: <>” Employee Code: HA |
WHY | No Activation |
WHEN | Source Type: WorkflowDuration Date Calculation: 1D |
WHAT | Type:Decision Code: APPROVAL Decision Option Set Code Code: APPROVAL Description: Approve or Reject Decision Option Set Line 1 Value: Approved Description: Approved Decision Option Set Line 2 Value: Rejected Description: Rejected Decision Option Set Code:APPROVAL |
To-Do Template 2 | Reference Type No: 81 (Gen. Journal Line) Code: WF120-TD020 Description: Payment Rejected |
---|---|
WHO | Employee Code: AH |
WHY | By Decision Type No.: 81 (Gen. Journal Line)Decision To-Do Template Code: WF120-TD010 Decision Value Filter: Rejected |
WHEN | Source Type: To-Do Source Code: WF120-TD010 Duration Date Calculation: 1D |
WHAT | Type: Manual Completion |
To-Do Template 3 | Reference Type No: 81 (Gen. Journal Line) Code: WF120-TD030 Description: Payment Approved |
---|---|
WHO | Employee Code: AH |
WHY | By Decision Type No: 81 (Gen. Journal Line) By Decision Template Code: WF120-TD010 Decision Value Filter: Approved |
WHEN | Source Type: To-Do Source Code: WF120-TD010 Duration: 1D |
WHAT | Type: Manual Completion |
Field Modifications
Field Modification Line 1
Old Status Level Filter: 0..14
New Status Level Filter: 2
Table ID: 81 (Gen. Journal Line)
Field ID: 34 (On Hold)
Fix Value Input: [Field Value is empty]
Workflow Template
Reference Type: 81 (Gen. Journal Line)
Code: WF120
Description: Payment Authorize
Editing Page ID.: 256 (Payment Journal)
Use Condition: WF120-C020
Condition
Table ID: 81 (Gen. Journal Line)
Code: WF120-C020
Description: Vendor Payment
Type: Workflow Use Condition
All Condition Lines
Active: Yes
Type: Field
Table ID: 81 (Gen. Journal Line)
Condition Line 1
Field ID: 6 (Document Type)
Filter: Payment
Condition Line 2
Field ID: 3 (Account Type)
Filter: Vendor
Condition Line 3
Field ID: 16 (Amount (LCY))
Filter: >1000
Use Condition: WF120-C030
Condition
Table ID: 81 (Gen. Journal Line)
Code: WF120-C030
Description: Vendor Balance Payment
Type: Workflow Use Condition
All Condition Lines
Active: Yes
Type: Field
Table ID: 81 (Gen. Journal Line)
Condition Line 1
Field ID: 6 (Document Type)
Filter: Payment
Condition Line 2
Field ID: 63 (Bal. Account Type)
Filter: Vendor
Condition Line 3
Field ID: 16 (Amount (LCY))
Filter: <-1000
Workflow Line 1
Type: To-Do
Code: WF120-TD010
Workflow Line 2
Type: To-Do
Code: WF120-TD020
Workflow Line 3
Type: To-Do
Code: WF120-TD030
Field Modification
Field Modification Line 1
Old Status Level Filter: 0..14
New Status Level Filter: >2
Table ID: 81 (Gen. Journal Line)
Field ID: 34 (On Hold)
Fix Value Input: Yes
Development
Standard NAV does not stop a Gen. Journal Line that is On Hold from being posted. So to enforce the approval process it is necessary to put a small piece of code in Codeunit 11 (directly at the beginning).
// >> Aptean Advanced Workflow example
TESTFIELD(“On Hold”,”);
// << Aptean Advanced Workflow example