Hi,
I'd like to have a better understanding of event subscribers, integration events and IsHandled flag. Let's say there is a procedure in a base codeunit that looks like:
local procedure Procedure1()
It makes no sense to me, what am I missing
Hi,
I'd like to have a better understanding of event subscribers, integration events and IsHandled flag. Let's say there is a procedure in a base codeunit that looks like:
local procedure Procedure1()
You are correct. If you set IsHandled = TRUE, then the SecondIntegrationEvent will not be called. This is the difficulty and danger of customization.
Your options are:
A. You are responsible for making sure everything that needs to happen happens in your EventSubscriber.
B. Handle ALL code in your Subscriber procedure.
C. Subscribe to a different IntegrationEvent
As you said, option B is difficult because you don't know who/what else might be subscribed to the SecondIntegrationEvent.
Option C is always worth exploring. Perhaps you can find an IntegrationEvent later in the process? You might have to "Undo" some of what was done after FirstIntegrationEvent but that can still be the better option at times. Keep in mind that you can ask Microsoft to add IntegrationEvents (aka. "Event Publisher") anywhere in the system. You can do that here: AL Event Requests
Hello,
We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
dynamicsuser.net/.../developers
I will open this up to the community in case they have something to add.
Thanks.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,387
Most Valuable Professional
nmaenpaa
101,156