Hi,
I am getting an strange error on Page. I create a Boolean variable 'testbool' and add it as field on page and write following code on OnValidate trigger of this field
testbool - OnValidate()
testbool := NOT testbool;
MESSAGE('test01');
Surprisingly, the OnValidate trigger is executing two times when I click on Boolean value i.e. above message appears two times. It this a bug in the product? Please help I need to fix it for my current upgrade project.
I am using NAV2013 (Build 7.00.34587). I can see there is a similar Hotfix released (KB 2797787 in Build 7.0.34194) by Microsoft but it does not resolve my issue.
Regards,
Ravi Prakash Goyal
0
Comments
Here is my actual code. The objective here is to reset the Boolean variable 'ScannedIsDefaulBarcode' to its original state if user does not confirm the action. If I don't do that, system will update the changed value to the variable, which is not correct.
Name ConstValue
Text007 Are you sure you want to set Default Barcode field to %1 for the scanned barcode %2.
ScannedIsDefaulBarcode - OnValidate()
IF CONFIRM(STRSUBSTNO(Text007,ScannedIsDefaulBarcode,ItemCross."Cross-Reference No.")) THEN BEGIN
IF ScannedIsDefaulBarcode THEN BEGIN
......
......
END;
END ELSE BEGIN
ScannedIsDefaulBarcode := NOT ScannedIsDefaulBarcode;
EXIT;
END