Codeunit "Tenant License State"
Exposes functionality to retrieve the current state of the tenant license.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
GetPeriod
Returns the default number of days that the tenant license can be in the current state, passed as a parameter.
procedure GetPeriod(TenantLicenseState: Enum "Tenant License State"): Integer
Parameters
| Name | Type | Description |
|---|---|---|
| TenantLicenseState | Enum System.Environment."Tenant License State" |
The tenant license state. |
Returns
| Type | Description |
|---|---|
| Integer |
The default number of days that the tenant license can be in the current state, passed as a parameter or -1 if a default period is not defined for the state. |
GetStartDate
Gets the start date for the current license state.
procedure GetStartDate(): DateTime
Returns
| Type | Description |
|---|---|
| DateTime |
The start date for the current license state or a blank date if no license state is found. |
GetEndDate
Gets the end date for the current license state.
procedure GetEndDate(): DateTime
Returns
| Type | Description |
|---|---|
| DateTime |
The end date for the current license state or a blank date if no license state is found. |
IsEvaluationMode
Checks whether the current license state is evaluation.
procedure IsEvaluationMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is evaluation, otherwise false. |
IsTrialMode
Checks whether the current license state is trial.
procedure IsTrialMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is trial, otherwise false. |
IsTrialSuspendedMode
Checks whether the trial license is suspended.
procedure IsTrialSuspendedMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is suspended and the previous license state is trial, otherwise false. |
IsTrialExtendedMode
Checks whether the trial license has been extended.
procedure IsTrialExtendedMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is trial and the tenant has had at least one trial license state before, otherwise false. |
IsTrialExtendedSuspendedMode
Checks whether the trial license has been extended and is currently suspended.
procedure IsTrialExtendedSuspendedMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is suspended and the tenant has had at least two trial license states before, otherwise false. |
IsPaidMode
Checks whether the current license state is paid.
procedure IsPaidMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is paid, otherwise false. |
IsPaidWarningMode
Checks whether the paid license is in warning mode.
procedure IsPaidWarningMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is warning and the previous license state is paid, otherwise false. |
IsPaidSuspendedMode
Checks whether the paid license is suspended.
procedure IsPaidSuspendedMode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the current license state is suspended and the previous license state is paid, otherwise false. |
GetLicenseState
Gets the the current license state.
procedure GetLicenseState(): Enum "Tenant License State"
Returns
| Type | Description |
|---|---|
| Enum System.Environment."Tenant License State" |
The the current license state. |