The capabilities of custom application code are not limited by event subscription. Customized objects can raise predefined business or integration events, and publish new custom events.
The following recipe explains how to create a new event in codeunit 21
Item Jnl.-Check Line. that will fire on journal line verification, before any other line validation code.
Item Jnl.-Check Lineand click the Design button to access its C/AL code.