Hi
What is the difference between first 2 statements
CLine."Sale Amount" := Amount;
CLine.VALIDATE("Sale Amount", Amount);
CDNLine.MODIFY;
Thanks
*This post is locked for comments
Hi
What is the difference between first 2 statements
CLine."Sale Amount" := Amount;
CLine.VALIDATE("Sale Amount", Amount);
CDNLine.MODIFY;
Thanks
*This post is locked for comments
Validate calls the OnValidate Trigger of the Field of that Table.
The first line CLine."Sale Amount" := Amount; will only assign Amount to CLine."Sale Amount"
CLine.VALIDATE("Sale Amount", Amount); will not only assign but also run the code written under CLine."Sale Amount".
Its recommended to use CLine.VALIDATE("Sale Amount", Amount);
André Arnaud de Cal... 291,735 Super User 2024 Season 2
Martin Dráb 230,466 Most Valuable Professional
nmaenpaa 101,156