Hi guys!
I'm upgrading a wizard from Nav 4.0 to Nav 2009. In the OnValidate of a field I put the following code
RecordVar.TESTFIELD("Cylinder in Bundle",TRUE);
Correctly it test my field and show the error (see the following...)
So far so good. Now I press F5 and appears the standard MessageBox that says to me that there're errors on the page and asks if I want to discard changes. I press yes, the error disappear but the code remains (see the following...)
Now I'm wondering why this strange behaviour, if I'm not wrong it would had had to empty the field automatically.
has anyone already faced a problem like this?
Thx in advance!
Comments
If your requirement is Bundle Certificate No. shd be allowed when Cylinder in Bundle is Yes, you can set editable false to those fields when Boolean is false and editable when boolean is true,
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Surely your solution works, and there are many work aroud but what I'm wondering is: why the standard function TESTFIELD here doesn't work properly?
It works as expected... More or Less...
I am trying to replicate your scenario..
Will update as soon as possible
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I tried it in NAV 2009 SP1 but couldnt succeed
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Right way to use TestField with boolen to check for true value in fields is
RecordVar.TESTFIELD("Cylinder in Bundle");
instead of RecordVar.TESTFIELD("Cylinder in Bundle",TRUE);
And this works for both Classic and RTC.
Nilesh Parekh
Oops..I also tested with
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Could be caused by RecordVar is temporary?
It works as expected... More or Less...
NAV 2009 R2 behaves strange sometimes compared to NAV 2009 SP1 and previous versions..
Higher or latest versions should become stable but R2 didnt meet that.. :-k
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
:-k I've got a feeling that I will have to use a work around.
Thx all for the help.
It works as expected... More or Less...