NotBlank in condition

Hi to all, I have a rather simple question. What I want to achieve is to force the user to enter a value in some specific fields if a condition is met. More precisely on the order form if the customer is a foreign customer then I want to make sure that the user will fill some specific fields on the order form (ie Sales Header). I’ve used the TESTFIELD on the onBeforePutRecord trigger but the problem is that it closes the form on error. What I want is to prompt the user in which field(s) he/she has to enter values and not close the form. The record should not be saved until the required fields are filled. What I want is something like the NotBlank property but to ‘activate’ it if a condition holds. Thanks in advance.

Use Message instead of Error

Maybe it works if you use the OnQueryCloseForm-Trigger

OnQueryCloseForm will only be triggered when the form is closed, but not when the user moves to another record. IMHO, the test should go into the table’s OnInsert or OnModify trigger, because the necessary conditions should be met regardless of which form is used for input.