Call Login Screen using code

omard
Member Posts: 20
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
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
-
To logout current user you could kill current session. To display login screen again I don’t see any way to archive that.0
-
You can't kill your own session.
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?Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kriki wrote:You can't kill your own session.
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?
With SQL you can kill even your own session0 -
kriki wrote:Why does the user need it? Is he so lazy?
Clicking that [X] can be a real bitch sometimes
nothing better than a nice sendkeys
100 ESC (just to be sure)
Alt-F
X0 -
nunomaia wrote:kriki wrote:You can't kill your own session.
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?
With SQL you can kill even your own sessionRegards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
If you use SQL Server command "KILL SessionID" you are opening a new session and not using existing.0
-
nunomaia wrote:If you use SQL Server command "KILL SessionID" you are opening a new session and not using existing.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
with
kill SEssionID
you can kill you own session.
Under Navision it is not possible (only with using ADO -> and then Kill)Do you make it right, it works too!0 -
kriki wrote:nunomaia wrote:If you use SQL Server command "KILL SessionID" you are opening a new session and not using existing.
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.0 -
Thanks for your comments guys. seems like sendkeys is the only option
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 betterlet's navigate!0 -
omard wrote:Thanks for your comments guys. seems like sendkeys is the only option
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....0 -
Why not have a table with a separate ID and Password? Link that to a specific USERID and make them login through that new table / form? Then just keep one generic user logged on all the time.
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.0 -
I am using the sendkey and working without problems... just sending something like:
"File-Database-Close;File-1" to close connection and open last opened company again... but be prepared for multilanguage and use the correct shortcuts... ;-)0 -
thanks kine
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 postslet's navigate!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions