Hi All
We have a client who requested to insert a logout button in a particular screen. Can anyone give me some ideas of how I can logout the current user and display the login screen using code (without using sendkeys)?
Thanks
Omar
PS: tried using companyclose but I did not manage either
let's navigate!
0
Comments
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
So best way is with sendkeys (with all its problems that can occur).
An even better way is to NOT do it. Why does the user need it? Is he so lazy?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
With SQL you can kill even your own session
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Clicking that [X] can be a real bitch sometimes
nothing better than a nice sendkeys
100 ESC (just to be sure)
Alt-F
X
http://www.BiloBeauty.com
http://www.autismspeaks.org
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Under Navision it is not possible (only with using ADO -> and then Kill)
Sorry for explaining me incorrectly. I was talking about using ADO and using SQL command kill. Using ADO you will have a new session ID.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
the reason why we need this button is that the client will be placing Navision in a dispatch area where salesmen are required to fill a sales order (which looks like a POS screen). When ready, the salesmen are required to click a LOGOUT button and basically Nav must logout the user and display a login screen for the next salesperson to login and enter his order. Using the red X is not user friendly in terms that the next user needs to manually click on the company to login (eg. File, Company, Open, or File and select company).
We managed to achieve this scenario using sendkeys but we were seeking something better
...or you could leave NAV logged in under one user, WAREHOUSE for example, setup with the relevant permission, and utilize Salesperson Codes on your orders. Just a thought....
www.NextEqualZero.com
A technical eye on Dynamics NAV
You might have to change a little code if you are storing USERID in any other fields so it doesn't pull the generic USERID, but it would work.
We built a timeclock once that basically did the same thing. Clock in and out when you get in, go to lunch, etc. It was for people who didn't really need access to Navision all the time.
My Blog - nav.education
"File-Database-Close;File-1" to close connection and open last opened company again... but be prepared for multilanguage and use the correct shortcuts... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
thats exactly what we are doing... our concern was in case the company "1" shortcut changes to a different company and therefore the prompted login screen would log the user to a different company than the one expected
thanks to all for the posts