EventSubscribers

EventSubscribers are a nice feature to add code to triggers in standard objects. It’s the replacement for changing the code directly in standard objects.

A sample:
add code at the end of trigger “Address 2”-OnValidate from page “Customer Card”. It’s a so called OnAfterValidate event. There are many events available in each standard object, which one can subscribe to.

Unbenannt

the syntax for the EventSubscriber Attribute, that connects the custom procedure with the standard trigger:

Unbenannt
for details goto here.

the code:
create a new codeunit or use an existing to add following code.
it’s needed that property EventSubscriberInstance is set in the codeunit.
for details goto here.

Unbenannt

the result:
Unbenannt

2 thoughts on “EventSubscribers

Leave a comment