web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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));
}

*This post is locked for comments

I have the same question (0)
  • Daniele Ferraretto Profile Picture
    on at

    Hi Naresh, it isn't suitable the use of userlog under system administration->Inquiries->user->user log?

  • Suggested answer
    Community Member Profile Picture
    on at

    How does this helps Naresh? Are you looking for any further help or it is just for knowledge?

    You should parametrized the USER ID to get the details about all the users, instead of current user.

    Best Regards,

    Vishal Salot

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans