Hi,
I need to close my session (ALT+F4(to close Nav) or F4 in session list (but with my session=true)) with code in a form.
But I can do it with a function witch send keys (ALT+F4) because my customer dislike it.
Someone now another trip to close Navision?
Thanks,
Tony.
0
Comments
I was thinking to call a imput of ALT+F4 but my boss dislike it, i try to close Nav colapsing it filling the memory but this is not a good idea :P., at last, I try to close it calling a *.bat whith a task kill but they not enjoy it,...
Now i don´t have more ideas,...
Thank for the reply.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
It´s possible that we have a user in the computer or not. If there is a user, he can open another window while the task is executing, so an alt+F4 emulation will try to close the active wnidow and not the Nav one.
And in the task manager i can have several Nav open and i want to close only the one who is executing my task, but all the tasks are named as Fin.exe and i can´t identify which one is mine.
Now i´m working whith the Alt + F4 emulating but i need another solution.
Tanks for all!!!!
Tony.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you so much!!!!!!
Bye,
Tony.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Hi Kine,
I want to try your codes above in C/AL Code Navision, but still confuse to implement that codes. What automation server do you using? Your codes above are not in C/AL Code language, aren't? How could I close Navision automatically using C/AL Code ?
Thank you.
Johanna
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you for your information.
I want to close Navision automatically because I don't want the user who is not authorized can login to Navision.
I have tried to use ERROR to terminate application, but after the ERROR message is appeared, the menusuite is still opened, so I think the other way is close the Navision.
Do you have another way to prevent user access Navision when this user ID is not authorized?
Please advice. Thank you
Johanna
Tasks that should run on the background are usually solved by the NAS.
|To-Increase|
This was already solved in another post. You can use SQL stored procedure for that if you are on SQL. If not, you can use another way - you need to use SendKeys to close the comany after you will find out that the user do not have permissions to login.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I traded my sanity for a railgun
@kine : thank you for your suggestion. I have using SQL as my database. I have tried to use sendkeys as below but it did not work.
I have searched the SQL Stored Procedure, but I just found the procedure to kill session idle user and prevent multiple access from 1 user. I cannot find the procedure to close navision or prevent user to access navision. Could you give me the link about the procedure to close navision or prevent user to access navision? Thank you
Johanna
What is the difference between "prevent multiple access" and "prevent access"? It is doing same thing, only with different conditions. You can modify it as you wish... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I just modified the query to prevent multiple user so the query can be used to prevent user who is not authorized from accessing Navision.
Case is closed. Using the stored procedure in SQL is the solution.
Thank you so much Kine.
Johanna
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.