problem in logoff

srinivas.chittem
srinivas.chittem Member Posts: 142
Hai

First I thankful to you all for shareing your views here..

i have problem in logoff...

Actually i am calculating idle time of a session then it reaches 5 min then session should be colsed logoff automatically..

how to write the logoff code manually..? will u please share your idea..


Thanks & Regards,
srinivas,India
+91-9985310163
Regards,
srinivas
"Delighting Customers.... Through Delivery Excellence" .

Comments

  • kine
    kine Member Posts: 12,562
    there is no Loggof but Disconnection (client is still open but disconnected from server). You just needs to do:
      Session.GET(SessionID);
      Session.DELETE(True);
    

    Session is record variable over virtual table Session.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • anirudh_laroiya
    anirudh_laroiya Member Posts: 19
    The command Session.GET(SessionID) work in which version 3.7, 4 or higher ?

    Anirudh
  • nunomaia
    nunomaia Member Posts: 1,153
    Session is a virtual table not a command
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • kine
    kine Member Posts: 12,562
    in all versions...

    SessionID is no. of the session you want to disconnect. the code is just example how you kill the selected version, not how to find it.

    And this example works on NAV 3.70 MS SQL option and on all NAV 4.00 and newer versions for both servers.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NaviDev
    NaviDev Member Posts: 365
    You can also try this instead.
    Session.SETRANGE("User ID", variableUserID);
    IF Session.FIND('-') THEN
      Session.DELETE(TRUE);
    
    Navision noob....
  • anirudh_laroiya
    anirudh_laroiya Member Posts: 19
    I am using Navision 3.7 with Navision Database. How can I use this table there.

    Anirudh
  • anirudh_laroiya
    anirudh_laroiya Member Posts: 19
    When I write Session.GET(SessionID) in trigger, at run time the following message appears
    'THE EXPRESSION TEXT CANNOT BE TYPE-CONVERTED TO A INTEGER VALUE'
    Tell me the write syntax and location for the syntax.


    Anirudh
  • kine
    kine Member Posts: 12,562
    1) I recommend some NAV developer course.
    2) Session id is integer type.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.