Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Best practices Integration events

Posted on by 23

Hi, I have a project and I want to add integration events, but I have two questions. What are the best practices for using integration events?

1) Can we add all integration events in a codeunit and call them in every procedure where we want to have an integration event or is better to add in every object separately.

2) How do I know if I need to add an integration event in my code? My code is well structured in procedures, so I’m planning to add an integration event at the beginning and one at the end of the procedure, but how do I know if I need integration events somewhere else, like in triggers etc.

thanks in advance
Categories:
  • Suggested answer
    Best practices Integration events
    Hi,
     
    Can we add all integration events in a single codeunit?
    It's better to add integration events directly in the object where they are relevant, rather than putting them all in a single codeunit.
    So,that the events will be closely tied to the specific logic they relate to and easier to understand and maintain.
    Note: If you have shared logic used across multiple objects, it's better to use a dedicated codeunit for those specific events.
     
    How do I decide where to add integration events?
    It's good to add events at the start and end of a procedure.
    Additionally, in cases like conditional blocks, triggers, or decision points, you can add integration events wherever you expect a need for extensibility or external interaction with your code logic.
     

    Feel free to reach out here if you have any further questions about this.

    Thanks,

    Gokul

    Congruent Infotech - https://www.congruentsoft.com/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans