Prevent closing a dialog

Hi all,
i have a dialog which contains some mandatory fields and if these fields are empty the dialog must not be closed.

So i extend the Dialog class and implement some code. Now i want to execute my “mandatory field” logic. But i can’t find a way to place my logic (to prevent the dialog being closed…). I tried to overwrite close, but close is never executed???

Any ideas?

Frank

You can try this .

if(Field.value == ’ ’ )

{

throw error (" Fill in the fields");

OR

error(strfmt(" Fill in the fields");

}

Hi,
thanks for your reply, but the problem is, where to place the code. Close doesn’t work and there is no validate (i think because dialog is a class…).

I will take a look at RunBase…

Frank

I not clear about your requirement, but have a look at \Classes\SalesParmCleanUp where the dialog close ok will be done only when the cleanupDate is entered(handled in validate).

That is exactly what i was looking for :slight_smile: