(simplified test example)
In a default cronus database I have added a new field to T37 - Sale Line, field = Qty2 (integer)
Code after this field:
Qty2 - OnValidate()
IF "Qty2" > 10 THEN
ERROR('Greater than 10');
I added this field on the sales line subform.
When I change this field (on the form) to 20 and give an enter or tab, to validate the field, the error appears once (what is good).
When I give not an error or tab, but click somewhere else in de subForm to validate the field, the error appears twice! (not good, should only be once).
While debugging I can seem to find anything strange. The call stack only shows the OnValidate trigger of field.
The OnValidate trigger is triggered twice, for the same record, same CurrFieldNo.
Does anyone knows how I can make sure the error comes only once, even if the user clicks to validate??
thanks!
Comments
You are saying that you have to click OK Twice, if you click somewhere else with your mouse?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
That's right.
My Blog - nav.education
Totally agree ...
A default NAV bug then ...
you can encounter the same behaviour in every version of nav: just try to do it by inserting a wrong item on sales lines...tab=single error; click=double error...
This have been solved in nav 2009sp1/RTC (well, this is pretty obvious )
P.S.: as you can imagine, the code under the trigger is NOT executed twice, the only problem is the double error
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
My Blog - nav.education
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog