I am working on code conversion from Business Central to NAV 2018. In BC, I have some code in EventSubscriber ‘OnAfterPostSalesLines’.
In NAV I am unable to find the same EventSubscriber. In which Event I can write the same logic as I did in BC?
I have looked into codeunit 80 in BC19.5 but there is the same event:
If the event does not exist, you have two choices:
Create the missing event in the base NAV2018.
Rework your code to use other event.
Depending on what you are trying to do, there might be other event that can be used, such as OnAfterPostSalesDoc, OnBeforeSalesInvLineInsert, OnBeforeSalesCrMemoLineInsert, etc.
Thanks for your reply,
Is it possible to add new EventPublisher in base codeunit i.e CU80?
yes in BC the event exist there but I am looking for the same/related event In NAV 2018.
If it’s NAV2018, you should have access to the standard Object Designer. Just copied the same event from BC to NAV. That way if you upgrade to BC, the code remains the same.