How to find code of Event/Subscription

navuser1navuser1 Member Posts: 1,329
Dear Sir,

How do I find the code of Event/Subscription in NAV 2016 ?

Thanks,
navuser1
Now or Never

Answers

  • HannesHolstHannesHolst Member Posts: 119
    In DEV-Environment -> Tools -> Debugger -> Event Subscriptions
  • navuser1navuser1 Member Posts: 1,329
    Thanks for your reply...

    I want to modify the code of the function related to "OnBeforePostSalesDoc(Rec)" in Codeunit 80 (NAV 2016).

    How do I do ?

    yvc6j5z8hgv8.jpg
    Now or Never
  • HannesHolstHannesHolst Member Posts: 119
    In DEV-Environment -> Tools -> Debugger -> Event Subscriptions -> Filter for Publisher Object ID "80" -> Filter for Published Function "OnBeforePostSalesDoc"

    In the columns "Subscriber Codeunit ID" and "Subscriber Function" you will see the Functions which are related to "OnBeforePostSalesDoc".
  • navuser1navuser1 Member Posts: 1,329
    Thanks for your quick reply...

    I have already checked the same but found nothing in the Event Subscriptions Page.
    Now or Never
  • HannesHolstHannesHolst Member Posts: 119
    Then, a Subscriber-function does not exists.
  • Remco_ReinkingRemco_Reinking Member Posts: 74
    edited 2018-01-30
    So to change the behaviour of OnBeforePostSalesDoc (which apparently is doing nothing) you have to create an Subscriber-function to this event.
  • navuser1navuser1 Member Posts: 1,329
    "OnBeforePostSalesDoc" is available in Standard database of NAv 2016 CU 26.
    Now or Never
  • geronimogeronimo Member Posts: 90
    edited 2018-01-30
    it depends on what you want to do.

    if you want to use this function then you have to make a subscriber function in a codeunit that links to this function:

    https://msdn.microsoft.com/en-us/library/mt299404(v=nav.90).aspx

    if you need to alter the signature of this function then you need to make modifications in codeunit 80.

    if you are searching for what code is behind this function, there is none if there are no subscribers. It only functions as a hook where you can link to.

    it is defined as a local function in CU 80 normally
Sign In or Register to comment.