Search code examples
axaptadynamics-ax-2009x++

How to determine which field has been updated?


What's the correct way to determine which field has been changed in update() method on a table?

I know it's possible in modifiedField() via fieldId but that's too early.


Solution

  • The method you are looking for is Orig()

    Look in the update() method of BOMTable or BankAccountTrans

    The table has a method called orig that exposes the values of the last saved state of the current record.

    a good example and description can be found here http://msdax.blogspot.co.uk/2007/07/programming-of-basic-methods-of-tables.html

     void update () {
         CustTable this_Orig = this.orig ();
         ;
    
         if (this_Orig.custGroup! = this.custGroup)
         {
           //Cust group is changing on this update
         }
         ...