Custom Workflows Setup NAV 2017 Issue

vikki
Member Posts: 28
Hi,
I have a requirement of creating custom workflow for a transaction say QC Entry. It needs to go through three levels USER1 > USER2 > USER3.
I have created a
1. Page for my transaction
2. Codeunit with custom events and response like ("Submit the Document","Approve the Document","Reject the document", etc.)
I have enabled workflow event hierachies, event/response combinations and created entry in workflow table relation
3. Codeunit with functions when Document is submitted,
4. Configured workflow user group for three levels and assigned to workflow setup
When USER1 submits the document, Status in QC entry table gets changed from New to Submitted and three level approval entries are created in Approval entry table. Entries are also created in Workflow Step Instance.
However after first approval, the entries in Workflow step instance gets updated. but after second level approval, entries in workflow step instance get deleted. Since these entries are deleted, my document is going through workflow levels but the response when Pending approvals = 0 is not executed.
When I debug, we get the entries deleted in CU 1501 -
IF IsWorkflowCompleted(ActionableWorkflowStepInstance) THEN
ArchiveWorkflowInstance(ActionableWorkflowStepInstance);
Any comments, if I am missing anything to complete all three levels.
I have a requirement of creating custom workflow for a transaction say QC Entry. It needs to go through three levels USER1 > USER2 > USER3.
I have created a
1. Page for my transaction
2. Codeunit with custom events and response like ("Submit the Document","Approve the Document","Reject the document", etc.)
I have enabled workflow event hierachies, event/response combinations and created entry in workflow table relation
3. Codeunit with functions when Document is submitted,
4. Configured workflow user group for three levels and assigned to workflow setup
When USER1 submits the document, Status in QC entry table gets changed from New to Submitted and three level approval entries are created in Approval entry table. Entries are also created in Workflow Step Instance.
However after first approval, the entries in Workflow step instance gets updated. but after second level approval, entries in workflow step instance get deleted. Since these entries are deleted, my document is going through workflow levels but the response when Pending approvals = 0 is not executed.
When I debug, we get the entries deleted in CU 1501 -
IF IsWorkflowCompleted(ActionableWorkflowStepInstance) THEN
ArchiveWorkflowInstance(ActionableWorkflowStepInstance);
Any comments, if I am missing anything to complete all three levels.
Thanks
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions