Eventing is major part while upgrading to business central, we face alot of customisation done in Customer database which needs to be evented and converted into extension.
You subscribe to events to extend application and interact with the base application and other extensions. This topic describes how to discover events that you can subscribe to without writing the code manually
I suggest you to see the topic mentioned below before moving further on this
I have got some query about how to identify the EventSubscriber for AL code. So lets take a dive into this.
To record the current session, Search for Event recorder in Business Central click the Start button located on the actions ribbon.
After starting the Event Recorder do not close the Window, open the session in different window.
Perform all the actions that you want to record while the Event Recorder session is on. For example, we want to make External Document No. Mandatory in Sales Order (which is default feature)
I will try to post the Sales Order and check go to Event Recorder window and stop
You will get the list of Event occured while doing this activity as shown below
You can directly copy the event subsciber code from GET AL Snippet
Copy the EventSubscriber and add a new Codeunit as mentioned in Why Event & Extensions for Microsoft Dynamics 365 Business Central (MSDYN365BC)?
You can ref for some more example on Events mentioned below.
Download Link for different version of NAV and Business Central