sessionId Function [AX 2012]

Updated: November 18, 2010

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Retrieves the session number of the current session.


int sessionId()

The numeric ID of the current session.

A session number is assigned when the Microsoft Dynamics AX client is started and connects to the AOS server. Every call of this function during the life of the Microsoft Dynamics AX client will return the same integer value.

The returned value is compatible with the SessionID extended data type.

The xSession contains methods that return information about individual user sessions.

static void sessionIdExample(Args _arg)
{
    int session;
    ;
    session = sessionId();
    print "This session ID is number " + int2Str(session);
    pause;
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: