OnRun()
IF ISCLEAR(NavisionTimer) THEN
CREATE(NavisionTimer);
NavisionTimer.Interval := 300000;
NavisionTimer.Enabled := TRUE;
//Fermer session inactive pendant plus de 30 minutes
KillSession;
KillSession()
DB.SETRANGE("My Database",TRUE);
DB.FINDFIRST;
Session.SETRANGE("Database Name",DB."Database Name");
Session.SETRANGE("My Session",FALSE);
Session.SETFILTER("Idle Time",'>%1',1800000);
IF Session.FINDSET
THEN
REPEAT
Session.DELETE;
COMMIT;
UNTIL Session.NEXT=0;
NavisionTimer::Timer(Milliseconds : Integer)
// MESSAGE('The current time is: %1',TIME);
//Fermer session inactive pendant plus de 30 minutes
KillSession;
Comments
Yes, even you can define specific TIME period for every individuals.
you can draw from this code.
OnRun()
IF ISCLEAR(NavisionTimer) THEN
CREATE(NavisionTimer);
NavisionTimer.Interval := 300000;
NavisionTimer.Enabled := TRUE;
//Fermer session inactive pendant plus de 30 minutes
KillSession;
KillSession()
DB.SETRANGE("My Database",TRUE);
DB.FINDFIRST;
Session.SETRANGE("Database Name",DB."Database Name");
Session.SETRANGE("My Session",FALSE);
Session.SETFILTER("Idle Time",'>%1',1800000);
IF Session.FINDSET
THEN
REPEAT
Session.DELETE;
COMMIT;
UNTIL Session.NEXT=0;
NavisionTimer::Timer(Milliseconds : Integer)
// MESSAGE('The current time is: %1',TIME);
//Fermer session inactive pendant plus de 30 minutes
KillSession;
NavisionTimer::TimerError(ErrorString : Text[1024])
MESSAGE(ErrorString);
You said yes, Then how to do it in NAV 13R2?
I will try your code if it works then great !