0

VALIDATE() - NAV

Posted by Nantharupan on 5:21 AM
VALIDATE() function is call the triggers function for the field. 

When we add, delete or modify a record or filed of a record, we tend to do some validation for the fileds. This validations are put in the On validate trigger of the field. However if you just change the field without calling the VALIDATE function, this trigger will not be called. So if we want to call the VALIDATE function before changing the field, its better to call the VALIDATE function.

We can use the following syntax to validate the GeneralLedgerEntry record field "G/L AccountNo". 

GeneralLedgerEntry."G/L AccountNo" := '100';
GeneralLedgerEntry.VALIDATE("G/L AccountNo"); 

The above two lines can be written into a single line as follows. 


GeneralLedgerEntry.VALIDATE("G/L AccountNo", '100');


0 Comments

Post a Comment

Popular posts

Copyright © 2009 On the way All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.