suppose i am checking a check box and after checking it will check a condition .If the condition is not valid then uncheck the checkbox.plz guide me . mention the code.
If you wish it to silently uncheck without an error message you can simply call ERROR('').
Also you may be tempted to do something like the following:
IF <yourbooleanfield> AND (NOT <your check>) THEN
ERROR('Error Message');
Don't do that, because Navision evaluates both sides of an AND operation even if the left evaluates FALSE. Of course, if your check procedure already checks to make sure the value in the boolean is true before running its logic, then you could safely condense the code to:
Comments
On the Onvalidate trigger of your Boolean field in the table add your check.
Your code should look something like this:
The ERROR command will automatically reset the entered value.
I hope this helps.
Regards,
Willy
Also you may be tempted to do something like the following:
Don't do that, because Navision evaluates both sides of an AND operation even if the left evaluates FALSE. Of course, if your check procedure already checks to make sure the value in the boolean is true before running its logic, then you could safely condense the code to:
It really depends on what you are doing.
I traded my sanity for a railgun