xSession.terminate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
terminate() |
Terminates the session ID that the object was instantiated with. |
terminate(Date) | |
terminate(Date, Int32) |
terminate()
Terminates the session ID that the object was instantiated with.
public:
virtual bool terminate();
public virtual bool terminate ();
abstract member terminate : unit -> bool
override this.terminate : unit -> bool
Public Overridable Function terminate () As Boolean
Returns
false if the user is not authorized to perform this function; otherwise, true.
Remarks
This API has a built-in authorization check that is invoked at run time. An exception is thrown if calls to the terminate method are made by users who do not have access to the development security key (SysDevelopment). The optional parameters allow you to put a timestamp on the session to ensure that it is the session you intend to terminate. The same session ID could be used at two different times. The terminate method is used in the Online users form to allow administrators to terminate sessions. An administrator might decide to terminate a session because it has stopped responding, is consuming a lot of resources, or its license needs to be freed for another user.
The following example confirms whether the user has permission to terminate the session. If so, the session is terminated.
server static public void Main(Args _args)
{
Session session;
session = new Session();
if (session)
{
session.terminate();
}
}
Applies to
terminate(Date)
public:
virtual bool terminate(Microsoft::Dynamics::Ax::Xpp::AxShared::Date date1);
public virtual bool terminate (Microsoft.Dynamics.Ax.Xpp.AxShared.Date date1);
abstract member terminate : Microsoft.Dynamics.Ax.Xpp.AxShared.Date -> bool
override this.terminate : Microsoft.Dynamics.Ax.Xpp.AxShared.Date -> bool
Public Overridable Function terminate (date1 As Date) As Boolean
Parameters
- date1
- Microsoft.Dynamics.Ax.Xpp.AxShared.Date
Returns
Applies to
terminate(Date, Int32)
public:
virtual bool terminate(Microsoft::Dynamics::Ax::Xpp::AxShared::Date _loginDate, int _loginTime);
public virtual bool terminate (Microsoft.Dynamics.Ax.Xpp.AxShared.Date _loginDate, int _loginTime);
abstract member terminate : Microsoft.Dynamics.Ax.Xpp.AxShared.Date * int -> bool
override this.terminate : Microsoft.Dynamics.Ax.Xpp.AxShared.Date * int -> bool
Public Overridable Function terminate (_loginDate As Date, _loginTime As Integer) As Boolean
Parameters
- _loginDate
- Microsoft.Dynamics.Ax.Xpp.AxShared.Date
The time that the user of the session logged on; optional.
- _loginTime
- Int32
The time that the user of the session logged on; optional.