General X++ Development
How do I detect if a field changed in X++?
How do I detect if a field changed in X++?
1 answer
Write an answerCompare the current value to orig().
MyTable original = myTable.orig();
if (original.MyField != myTable.MyField)
{
info('Field changed.');
}If you already have the original buffer, do not run another database select just to figure out what the old value was.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer