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

Modify the Update method on the salestable

(0) ShareShare
ReportReport
Posted on by

Hi, I have a date field in the salestable.   When this is changed, I need to update other date fields to the same value in the salestable and the salesline.

I'm new the 365, how do I access the update method on the sales table?

Thanks in Advance!

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    You can use Chain of Command, or event handlers to run your code when the standard update method of SalesTable table is triggered.

    Chain of Command is the recommended way.

    You can check this documentation to understand how to use it: docs.microsoft.com/.../method-wrapping-coc

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Use chain of command. Using event handler is an option but COC is preferred way.

  • brianmaric Profile Picture
    on at

    Thank You!

    Is this the correct Syntax?

    [ExtensionOf(tableStr(SalesTable))]

    final class MySalesTable_Extension

    {

       public void update()

       {

           next update();

    // put my new code here

       }

    }

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

    The syntax is correct. However if you test it you will notice that it will not update your fields.

    You need to put your code before the "next" call, otherwise it's executed only after the standard update method, and that would be too late.

  • brianmaric Profile Picture
    on at

    oh ok...

    So, my code will be called before the standard code is called?

  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    yes , if you put it before calling next.

  • brianmaric Profile Picture
    on at

    Thank you

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 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans