Hi, some fields in some tables are a “must” and in some cases the user should’t be able to close a window when he hasn’t put some data in the field… for example the debitor city… when you define this is the table a warning message appears only when you try to move the cursor out of that field… when you never make a focus on the field then there is no warning… i want’t to make a function that when some specified fields are not filled out the form should not be able to get closed… But how ? In the on close trigger the form is already closed… worst solution maybe to open the form again with the actual record… but then navision will crash after about 15-20 tries… Regards, MarcS
Use the Search-Engine of this forum and look for the word “mandatory”. I posted a detailed solution last september.
Use the following in th OnCloseform-Trigger if <Condition = some Fields are not filled out yet> then error(’’) error(’’) produces an error without a message. Marco
Don’t put your code to the OnCloseForm trigger. Use the OnQueryCloseForm trigger instead. If you return False in this trigger, the form will not be closed. Marcus Marcus Fabian phone: +41 79 4397872 email@example.com