Breyta

Deila með


Session Data type

Version: Available or changed with runtime version 1.0.

Represents a Microsoft Dynamics Business Central session.

Static methods

The following methods are available on the Session data type.

Method name Description
ApplicationArea([Text]) Gets or sets the application areas for the current session.
ApplicationIdentifier() Gets the application ID associated with the current thread.
BindSubscription(Codeunit) Binds the event subscriber methods in the codeunit to the current codeunit instance for handling the events that they subscribe to. This essentially activates the subscriber functions for the codeunit instance.
CurrentClientType() Gets the client type that is running in current session.
CurrentExecutionMode() Specifies the mode in which the session is running.
DefaultClientType() Gets the default client that is configured for the server instance that is used by the current session.
EnableVerboseTelemetry(Boolean, Duration) Temporarily enable verbose telemetry on the current session.
GetCurrentModuleExecutionContext() Gets the current session's execution context for the currently executing module.
GetExecutionContext() Gets the current session's execution context.
GetModuleExecutionContext([Guid]) Gets the current session's execution context scoped to a specific module.
IsSessionActive(Integer) Tests if the specified SessionID is active on the server instance where it was started.
LogAuditMessage(Text, SecurityOperationResult, AuditCategory, Integer, Integer [, Dictionary of [Text, Text]]) Logs a message to an audit account. Note, these logs are accessible to customers and will also be logged to a security audit account.
LogMessage(Text, Text, Verbosity, DataClassification, TelemetryScope, Text, Text [, Text] [, Text]) Logs a trace message to a telemetry account.
LogMessage(Text, Text, Verbosity, DataClassification, TelemetryScope, Dictionary of [Text, Text]) Logs a trace message to a telemetry account.
LogSecurityAudit(Text, SecurityOperationResult, Text, AuditCategory [, Array of [Text]] [, Array of [Text]]) Logs an IfX audit message to a telemetry account.
SendTraceTag(Text, Text, Verbosity, Text [, DataClassification]) Send a trace tag to the telemetry service.
SetDocumentServiceToken(Text) Sets the document service token in the current session.
StartSession(var Integer, Integer [, Text] [, var Record]) Starts a session without a UI and runs the specified codeunit.
StartSession(var Integer, Integer, Text, var Record, Duration) Starts a session without a UI and runs the specified codeunit.
StartSession(var Integer, Integer, Duration [, Text] [, var Record]) Starts a session without a UI and runs the specified codeunit.
StopSession(Integer [, Text]) Stops a session.
UnbindSubscription(Codeunit) Unbinds the event subscriber methods from in the codeunit instance. This essentially deactivates the subscriber methods for the codeunit instance.

Get Started with AL
Developing Extensions