#GPPT Automatic Logout Not Identifying Activity and Logging Out

David Meego - Click for blog homepageWe get reports every now and then of a user being logged out of Microsoft Dynamics GP by the GP Power Tools Automatic Logout feature even though they have been active on GP within the timeout period.

This happens because there is no way to track “Inactivity” in Microsoft Dynamics GP, so instead we attempt to track “Activity” by triggering on common events/scripts within GP and resetting the last active time and date.

However, there are times when a user could be active in GP and manages to avoid invoking any of the actions that would be identified as “Activity”. When this happens, they can be logged out incorrectly.

The behavior of Automatic Logout is explained in the following article:

Common tasks that are picked up by GP Power Tools include opening new windows or swapping between windows. It also includes checking for record notes. This will pick up almost all activity within Microsoft Dynamics GP and also in Dexterity based Add on products.

If a user stays on a single window and does not move out of that window and does not change a record that would check for a record note, it is possible that no activity will be detected. Then unless they are in front of their screen for the final minute when the Automatic Logout dialog is displayed, they will be logged out.

If you open the Process Monitor (Microsoft Dynamics GP menu >> Process Monitor) and select the Timed Queue, you can see when activity has been detected last.  The Auto Logout process is updated once a minute and will displays the last activity and logout times.

If this situation occurs for you, once the window is open, please use GP Power Tools to capture logs of the activity we want to capture. If there is Dexterity code executed, you can use the Developer Tools module to trigger after this code (Focus Event, Procedure or Function) and call the Automatic Logout reset script.

To see what is happening at the Dexterity level, use Tools >> Start Manual Logging, then perform any common action on the window that you want to detect. Then select Tools >> Stop Logging and review the Script*.log file to see what scripts have been executed. You can then trigger on a script to reset the last activity date and time using the calls shown below.

GP Power Tools Trigger code (in context of GP Power Tools)

call MBS_Auto_Logout_Timed_Process_Reset;

If there is custom code written in Dexterity, it can call the same script across dictionaries to reset the last activity.

Dexterity code

call with name "MBS_Auto_Logout_Timed_Process_Reset" in dictionary 5261;

If there is custom code written in Visual Studio, it can invoke the same script to reset the last activity.

Visual Studio Tools code

GpPowerTools.Procedures.MbsAutoLogoutTimedProcessReset.Invoke();

Another manual solution is for the user to click on a different Dexterity window every now and then to reset the activity date and time themselves.

For more information on managing your user licenses see:

For more information see:

Hope this is helpful.

David

07-Dec-2023: Added information about checking the Process Monitor window.
12-Jan-2024: Added article with Immediate Automatic Logout sample.

This article was originally posted on http://www.winthropdc.com/blog.