December 2018
Beginner
210 pages
5h 7m
English
The event publisher function itself does not contain any code. We declare a publisher function to define its signature and identify the place in the code where the event is triggered. We will raise custom events on invoice and journal line creation in codeunit 50504 Customer Payments Mgt.. The first one is OnBeforeCreateInvoice, which is to be triggered when the creation of an invoice from the contract is invoked, but before the document is created.
The first step in raising an event is to create a function carrying the event signature. Declare a function, OnBeforeCreateInvoice, in codeunit 50504 Customer Payments Mgt. with one parameter, as shown in the following code sample:
[Integration]LOCAL PROCEDURE OnBeforeCreateInvoice(LeaseContractHeader ...
Read now
Unlock full access