Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the previous field value in the modifiedField method of a Dynamic Ax table?

Tags:

axapta

x++

I would like to be able to perform some logic in the table.modifiedField method which compares the previous value of a field to the new value. How do I get to the previous value?

like image 945
James Moore Avatar asked Oct 16 '08 18:10

James Moore


1 Answers

The record buffer as it was before any modifications is available through the this.orig() method.

public void modifiedField(fieldId _fieldId)
{
    super(_fieldId);
    info(strfmt("Field number %1 changed from %2 to %3",_fieldId,this.orig().(_fieldId),this.(_fieldId)));
}
like image 164
Jay Hofacker Avatar answered Sep 28 '22 14:09

Jay Hofacker