User Wise Kill IDLE Session

naveengournaveengour Member Posts: 22
Hi All,

I want to kill IDLE session User wise. Can i able to do that in NAV 2015.? Please advise.

Comments

  • navuser1navuser1 Member Posts: 1,329
    naveengour wrote:
    Hi All,

    I want to kill IDLE session User wise. Can i able to do that in NAV 2015.? Please advise.

    Yes, even you can define specific TIME period for every individuals.
    Now or Never
  • kokyas963kokyas963 Member Posts: 16
    Hi ,
    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);
  • naveengournaveengour Member Posts: 22
    Hi NavUser,

    You said yes, Then how to do it in NAV 13R2?
  • naveengournaveengour Member Posts: 22
    Hi Kokyas,

    I will try your code if it works then great !
Sign In or Register to comment.