Form field validation

I created 2 new form fields and they can not be empty.

so in Form - OnQueryCloseForm() : Boolean create a condition

IF ((“x” = 0T) OR (“z” = 0D)) AND (y=FALSE) THEN BEGIN
MESSAGE(Text001);
EXIT(FALSE);
EXIT; END;

But, this is bot the best solution, because if a user, for mistake, executes this form the message appears, and is not ok.

I tried this cindition in Form - OnModifyRecord() : Boolean, but thoes not work correctly.

Any idear?

just stop and rethink. Best is that instead of inventing square wheels use the ones you have. Navision is not designed to do what you are trying to do, so examine the actual business requirement and solve it properly.

Hi, instead of adding code to the form object, try changing the NotBlank property on the field from No to Yes.on the table instead. This may give the results you are looking for