Hi
We have a customer that ask for a form to be displayed in background always (users can't close it). I used OnQueryCloseForm trigger and it's ok, but the problem is when I try to close Navision, it won't close.
I've tried to close the form from function LoginEnd from codeunit 1 but doesn't work.
Thx for any help
0
Comments
I guess you could do that. I don't know though how you start the form, important for my solution is that a global variable holds the form as long as the session is active.
Form code:
Codeunit:
This is non-tested code, but I think my intentions are clear enough
Thx
Ok. I tested the solution I wrote, so I see what you mean. You can't tell the user to close the Main Menu before closing Navision I suppose (LoginStart and LoginEnd are called from there). frm as global variable fails too as Navision let go of the instance immediately.
A solution could be:
- A single instance Codeunit to hold the Status of the OK2Exit variable
- User must close Main Menu before closing Navision.
Not much of a help though :oops:
(Would be nice with an exit type user/system in the Currform!)
try this in the OnQueryCloseForm-Trigger
IF NOT CONFIRM(Text001) THEN
EXIT(FALSE);
So users will asked before close Form.
If answered with "yes", the form will close and Navision can be closed too.
Have fun