Hello,
We are migating our code from NAV 2018 to Business Central 17.5. We are facing a problem : we used to call the procedure FindPrinter() in codeunit 1, but this codeunit no longer exists. Instead, it has been split in several codeunits, some in the system app, others in the base application app. The codeunit 2000000005 "Reporting Triggers" contains the Business Event GetPrinterName. There is an event subscriber to this Business Event in codeunit 44 ReportManagement, containing an event publisher.
My purpose is to call the procedure GetPrinterName at a specific moment of my code. The Microsoft documentation says (here) :
- "Currently, we don't recommend that code subscribes to the events in the new system codeunits 2000000001..2000000010 directly. Although not blocked, it might be in a future release. Instead, you should subscribe to one of the integration events."
How should I call the GetPrinterName procedure in that case ? I could susbscribe to event publsiher in codeunit 44, but I won't be able to launch the procedure when I want to, only to run my additionnal code when the procedure is called. Shall I call the procedure GetPrinterName of the Business Event in codeunit 2000000005 ?
Thank you