Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46681

How to find the latest session ID of a user from Ax ?

$
0
0

scenario: To get the latest session id of a user ,if multiple client sessions(multiple session id's)exists.

solution:

// #! INCIDENT !#.LAST.18.02.16.Naresh.D
static void latestSessionID(Args _args)
{
    SysClientSessions sysClientSessions;
    UserInfo userinfo;
 
    select firstonly sysClientSessions order by  LoginDateTime desc
    join userinfo where userinfo.id == curUserId()
                     && sysClientSessions.sid == userinfo.sid;
    info(strFmt("%1",sysClientSessions.SessionId));
}


Viewing all articles
Browse latest Browse all 46681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>