Codeunit "Environment Information"
Exposes functionality to fetch attributes concerning the environment of the service on which the tenant is hosted.
Properties
Name | Value |
---|---|
Access | Public |
SingleInstance | True |
InherentEntitlements | X |
InherentPermissions | X |
Methods
IsProduction
Checks if environment type of tenant is Production.
procedure IsProduction(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the environment type is Production, False otherwise. |
GetEnvironmentName
Gets the name of the environment.
procedure GetEnvironmentName(): Text
Returns
Type | Description |
---|---|
Text |
The name of the environment. |
IsSandbox
Checks if environment type of tenant is Sandbox.
procedure IsSandbox(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the environment type is a Sandbox, False otherwise. |
IsSaaS
Checks if the deployment type is SaaS (Software as a Service).
procedure IsSaaS(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the deployment type is a SaaS, false otherwise. |
IsOnPrem
Checks the deployment type is OnPremises.
procedure IsOnPrem(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the deployment type is OnPremises, false otherwise. |
IsFinancials
Checks the application family is Financials.
procedure IsFinancials(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the application family is Financials, false otherwise. |
IsSaaSInfrastructure
Checks if the deployment infrastucture is SaaS (Software as a Service). Note: This function will return false in a Docker container.
procedure IsSaaSInfrastructure(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True if the deployment infrastructure type is a SaaS, false otherwise. |
GetApplicationFamily
Gets the application family.
procedure GetApplicationFamily(): Text
Returns
Type | Description |
---|---|
Text |
The application family. |
VersionInstalled
Gets the version which a given app was installed in.
procedure VersionInstalled(AppID: Guid): Integer
Parameters
Name | Type | Description |
---|---|---|
AppID | Guid |
The module ID of the app. |
Returns
Type | Description |
---|---|
Integer |
The major version number when the app was installed. |
CanStartSession
Checks if a new session can be started via the Session.StartSession call.
procedure CanStartSession(): Boolean
Returns
Type | Description |
---|---|
Boolean |
True, if a new session can be created, false otherwise. |
EnableM365Collaboration
Sets M365 Collaboration to enabled in the tenant admin center
procedure EnableM365Collaboration()
GetLinkedPowerPlatformEnvironmentId
Gets the linked Power Platform environment id.
procedure GetLinkedPowerPlatformEnvironmentId(): Text
Returns
Type | Description |
---|---|
Text |
The linked Power Platform environment id, if set. |