web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Table -- Events -- OnInserting, OnInserted

(1) ShareShare
ReportReport
Posted on by 448
Dear team,
 
I explored the things and what I understood about table events
 
In an AX 2012 insert method override, any code written before the super() call is executed on-inserting while any code written after the super() call is executed on-inserted. 
 
So, here in D365FO, MS introduced many events in Table level. So, On-Inserting and On-Inserted is one of them.
 
My understanding --
For example --  if I used On-Inserting in table events,  it actually called the table insert method and before super it executed the On -inserting code and after super it will executed On-Inserted code. The super activity id happening internally.
 
Am I correct?
Categories:
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,286 on at
    Table -- Events -- OnInserting, OnInserted
    Hi,
    Your understanding is mostly on point, but there’s a subtle distinction worth clarifying.
    In Dynamics 365 Finance and Operations, the OnInserting and OnInserted table events are indeed designed to mirror the behavior of pre- and post-super() logic in AX 2012's insert() method override. However, these events are not tied to the super() call in the same way as in AX 2012. Instead, they are triggered by the framework itself during the insert operation:
    OnInserting is raised before the actual insert operation takes place.
    OnInserted is raised after the insert has been completed.
    So while it’s conceptually similar to the AX 2012 pattern, the execution of these events is handled by the framework and not directly influenced by a developer’s placement of super() in custom code. The super() call is internal and not exposed in the same way.
    For further reference, you might find the official documentation on Table Event Handlers in D365FO helpful.
     
    Please verify if this explanation aligns with your expectations and let me know if it was useful.
    Thanks and best regards,

    Daniele
    Note: This response was prepared with support from Copilot to ensure clarity and completeness.
  • Sohaib Cheema Profile Picture
    47,946 User Group Leader on at
    Table -- Events -- OnInserting, OnInserted
    Hi,
    Yes, one is for Pre-Insert and other for Post-Insert. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 194

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
Sahan Hasitha Profile Picture

Sahan Hasitha 110

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans