Modify ApprovalsMgmt in NAV 2016

IvonaKIvonaK Member Posts: 115
Hi to all,

I have a task, to do some modification in Sales Approvals Management. I do that in CU:439 Approvals Management in functon FindApproverSales in NAV 2013.

But now in NAV 2016 I can't find a CU:439. On page Sales Order on Page Action "Send Approval Request" I see the code:

IF ApprovalsMgmt.CheckSalesApprovalsWorkflowEnabled(Rec) THEN
ApprovalsMgmt.OnSendSalesDocForApproval(Rec);

where ApprovalsMgmt is CU:1535 in NAV 2016 and OnSendSalesDocForApproval is Event with out code.
[IntegrationEvent] OnSendSalesDocForApproval(VAR SalesHeader : Record "Sales Header")

Can please somebody tell me how to find the code that execute calling the ApprovalsMgmt.OnSendSalesDocForApproval(Rec);

Thanks a lot,
Best Regards,

Answers

  • postsauravpostsaurav Member Posts: 708
    For Checking any Event subscriber you can do it like -

    1. From Tools select Debugger and select Event Subscription.
    2. Look for the Publisher Object ID as your object ID & Published Function as function Name and then see the subscriber in the same window.
    3. The Subscriber will have the code that you want (may be in different format than 2015).

    Refer Here - http://saurav-nav.blogspot.in/2015/12/microsoft-dynamics-nav-2016-events.html

    IN your Case the Code that will fire when this event is fired is in -
    Codeunit - 1520
    Function Name - RunWorkflowOnSendSalesDocForApproval

    You actually need to learn two things if you want to customize approvals -
    1. Event & Subscriptions.
    2. Workflow Events & Responses.
    3. Workflow technically.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • IvonaKIvonaK Member Posts: 115
    Thanks a lot.

    I will do as you advise.
    Best Regards,
Sign In or Register to comment.