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

Table - Method / Events in d365fo

(0) ShareShare
ReportReport
Posted on by 6

Hi team,

I have little confusion between Application Explorer -- Table - Methods & Events

For example -  Cust Table- ModifiedField

PIC 1 -Method - 

5468.a1.jpg

Pic 2 Events - 

pastedimage1678855694608v1.png

OnModifiedField - (Post Event)

OnModifyingField - (Pre Event)

Kindly let me know is both (Pic1 & Pic2) are same? Only the approaches are different?

If required, Shall I use anyone of them?

Please give me more shed on this.

thanks!

  • @rp@n Profile Picture
    6 on at
    RE: Table - Method / Events in d365fo

    sure Girish

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Table - Method / Events in d365fo

    I think there is no such difference between the two methods. But while searching I found that ModifiedFieldValue method won't be called in the batch process, but modified field does get called.

    You can try implementing the two methods and analyze them.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: Table - Method / Events in d365fo

    Hi Girish,

    Thank you for the update. Only one thing finally

    What is the use of below events? and when to use those ?

    Table - Events

    pastedimage1678862717157v1.png

    Please give me more shed on this.

    thanks!

  • Bharani Preetham Peraka Profile Picture
    3,622 Moderator on at
    RE: Table - Method / Events in d365fo

    Understood Girish. Thank you.

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: Table - Method / Events in d365fo

    No, you cannot change that directly - You need to contact MS.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: Table - Method / Events in d365fo

    Thanks Girish for the update

    Suppose the hookable is set to false and if required to set hookable to true. then we need to contact MS or we can directly change by myself ?

    pls give me more shed on this

  • Suggested answer
    GirishS Profile Picture
    27,823 Moderator on at
    RE: Table - Method / Events in d365fo

    Event handlers supports public method, but Private and protected methods can also be accessed from event handlers if there is a hookable attribute is set to true on that method identifier.

    [Hookable(true}]
    private void methodName()
    {
    }

    Since the methodName has hookable attribute set to true you can write event handler for that method.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: Table - Method / Events in d365fo

    Thanks Bharani

  • Verified answer
    Bharani Preetham Peraka Profile Picture
    3,622 Moderator on at
    RE: Table - Method / Events in d365fo

    No it's wrong. Private method can be accessed only from that class not from extension like coc or event handler.

    Event handler supports public method and coc supports both public and protected methods.

    Also you can try the same thing in vs so that you can get clear understanding.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,556 Moderator on at
    RE: Table - Method / Events in d365fo

    Hi, I think its basically about placement of your code in a method. Sequence is Pre-Event Handlers are called first, then particular method will be executed. Before call to super, Pre Events are called, after super Post Events are called and in last Post Event Handlers

    Pre-Insert (Pre-Event Handler)

    OnInserting (Pre-Event)

    super ()

    OnInserted (Post-Event)

    Post-Insert (Post-Event Handler)

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,978 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,821 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans