4

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.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Nico
  • 1,175
  • 15
  • 33

1 Answers1

5

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
     }
     ...
David Lawson
  • 796
  • 3
  • 10