With this article, I will try to clarify all doubts and questions about Page Trigger Events.
This will help Developers to subscribe to Page Trigger Events. Let’s discuss that in details.
With this blog post, Microsoft announced the March update of the Developer Preview. The usual Docker images will be publicly available on April 2nd and will contain the Microsoft Dynamics 365 Business Central release candidate.
In the blog post Microsoft listed a number of nice improvements and a lot of fixed issues. However, one of the improvements didn’t make it to the blog post, maybe because it was also discussed in one of the issues on GitHub.
Anyway, it is an import feature, so I’m going to explain it here. The tableextension object has four new triggers:
On my last blogpost on Source Code Analysis (which focused on the LineCount), I got the remark whether it would be interesting to drill into “statements”. I didn’t really know what he meant with it – but it made me think and drill down into the usage of the procedures.
Let’s start it with What Microsoft Says About Events, Publisher and Subscribers.
An event is the declaration of the occurrence or change in the application. An event is declared by a C/AL function, which is referred to as an event publisher function. An event publisher function is comprised of a signature only and does not execute any code.
When you reference a .NET class that exposes events, and you switch on the WithEvents property, C/SIDE creates the event triggers for you. If you later want to update the reference to the .NET class, for whatever reason (like, there is a newer version of the assembly), updating the reference will actually delete the event triggers with all the code in them.