Like the database trigger events described in the previous section, page trigger events are not raised by C/AL code, but initiated by the NAV platform. UI events are triggered in response to user actions in different UI controls. These events are closely related to traditional page triggers generated by pages and page controls.
To see how to use this type of event, we will extend the functionality of the action button Post on the 39 General Journal page. As the name implies, the Post button runs the Gen. Jnl.-Post batch job. Suppose we want to augment this function by opening the list of G/L entries posted by the job. Since what we want to do is perform a UI extension, it is logical to use UI events for this purpose.
We will place the new event subscriber in the same codeunit, Lease Contract Events, we used for event subscribers before. Create a function in the codeunit...