Workflow in Microsoft dynamics NAV 2017

I created two Tables ; (1.) Requisition Header (2.) Requisition Lines.

Requisition Header
Field Name Data Type Length
No. Code 22
Employee Code Code 10
Status Option (Open,Released,Pending Approval,Pending Prepayment,Rejected,Archived)
Posted Boolean
Raised by Code
MA Approval Boolean
User Code (User) 30
Document Type Option (Purchase Requisition,Store Requisition
Currency Code Code (Currency) 10
Rejected Boolean
Requisition Line
Field Name Data Type Length
Requisition No Code 10
Line No Integer
Type Option (G/L Account,Item)
No Code (IF (Type=CONST(G/L Account)) “G/L Account” ELSE IF (Type=CONST(Item)) Item) 10
Quantity Decimal
Description Text 250
Unit of Measure Code (Unit of Measure)
Unit Price Decimal
Amount Decimal
Quantity Approved Decimal
Quantity in Store Decimal
Requisition Status Option (Approved,Rejected)

After I designed a Page, in its page action, I added Send Approval Request,

In the Codeunit 1535, I added a function called OnSendRequisitionForApproval (Event: Publisher, Event Type: Integration).

I call the function in the Page created

ApprovalMgt.OnSendRequisitionForApproval(Rec);

After I run the Page and fill the necessary fields and clicked Send Approval Request, no effect.

Thanks.

Hi,

Have you worked with approvals before?

If yes, then you would know that a few lines of code is not enough. You need event subscribers and to setup up your approval workflow. And a few more things.

May I suggest that you eventually check this blog post:

https://tinamenezes.wordpress.com/2017/11/25/procedure-to-create-a-customized-workflow-in-dynamics-nav-by-creating-new-workflow-events-part-1/

Thank for your response,

No, I have not worked with approvals before.

Then you most definitely should go through that blog post first. Working with workflows is not as easy to learn. Required both all this special code, and a lot of setup of the new workflows.

Am grateful to know you, Sir.

How you help me with post button, am new to it.

Thanks.

With the tables, I want to add Post button but i dont know how to go through, am new to this.

Thanks.

Yes you are new, no I will not do it for you, we will show you how you can learn to do it.

The work is not just done by adding a post button. I really recommend that you try out the example in that blog post i a separate database. It will give you a much better understanding of what it requires. And when you get that to work, then you can implement it in your own system. My guess is that it took me a day or so, to get my first workflow to work. But it requires that you already master the rest of NAV and understand all the concepts.

I really recommend that you find a place near you, where you could get a NAV developer “Master Class” or something similar. And that you follow NAV Skills free webinar about Dynamics NAV development. If not, then you can find the older episodes on youtube.

I have achieved the workflow and left with post button. Have not seen the blog post?

May I suggest that you eventually check this blog post:

Procedure to create a customized Workflow in Dynamics NAV by creating new workflow events – Part 1Tina Menezes’ Blogs


Introduction: Workflows are created in Dynamics NAV which when enabled perform a series of steps one after the other automatically and carry out actions as specified in the workflow. Workflow consi…