Prevent a form from closing


I add a line of code in OnCloseForm trigger in Form Item Card. The code was this:

IF “Global Dimension 2 Code” <> “Special Code” THEN ERROR(Text001);

Every time i close form, the error message show up. After click the error box it always close the form.

I want form not closed after the error comes out. Is there a code to cancel the form from closing ?

No one able to help me ?

Did you try by writing the code in Form - OnQueryCloseForm trigger?

Please be patient. You wont get answers as soon as you post.