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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How works table events

(0) ShareShare
ReportReport
Posted on by 40

Hello everyone,

I'm starting my journey with d365, so could you tell me what purpose and how work tables events.

When they are executed? Only in form, or every time when you trigger table.

Thanks for your time

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    It depends. For example, OnInserted is triggered every time you insert a record, whether it's from a form or some other way. But field validation, for instance, is called automatically by forms but not when you change a field value in code. There you must explicitly call a validation method (which will then raise the event as well), if you want a validation.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Moved to D365 Finance forum.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Skribl,

    In Addition to Martins's answer. You can check articles:

    1. Event method sequences in forms (docs.microsoft.com/.../event-method-sequences-in-form-scenarios). Will help you to understand how a form interacts with tables.

    2. Table method sequences (shyamkannadasan.blogspot.com/.../table-method-calling-sequences-in-d365.html). Will help you to understand in what sequence methods are called in a table.

    3. allaboutmsdynamics.wordpress.com/.../ - list of methods and corresponding events. It will help you to understand how you can find events for certain methods by name.

  • Skribl Profile Picture
    40 on at

    Than you Martin for you response.

    Is there any online documentation for each event?

    Which event is triggered when you executeQuery in form?

    Is it possible alter a query?

    Main issue is:

    HcmJob table isn't company specific, so we added new field as dataAreaId (custom) by table extension.

    Is there any way to  alter all queries where table is used?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    The names of the events are quite self explanatory.

    No table event is triggered when form query is executed.

    But, form data source event "onQueryExecuting" and "onQueryExecuted" are triggered.

    You can't make standard tables company specific by adding DataAreaId. And this table already has DataAreaId (the value is always "dat"). All tables have DataAreaId.

    You can't alter all queries where a table is used. You need to think a bit different. You are extending the standard system. Extending means adding your stuff on top of it, not rocking the foundations.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Please don't change the topic of this thread - simply create additional threads for other questions. That makes easier to track what we're talking about, whether a question has been answered and what the answer was (by verifying the answer of a thread).

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans