Skip to main content

Enumerations

This section documents the key enumerations used in the Admin Hub solution.

ConnectionType_TSL​

Defines the types of connections available for communicating with external services. This enum is extensible and implements the IConnectionClient_TSL interface.

Namespace: Theta.AdminHub.Client

Extensible: Yes

Default Implementation: NotImplementedClient_TSL

Usage​

Plugins extend this enum to add new connection types:

enumextension 50100 "BC Admin Center Connection" extends ConnectionType_TSL
{
value(50100; "BC Admin Center")
{
Caption = 'BC Admin Center';
Implementation = IConnectionClient_TSL = "ConnectionClient_TSL";
}
}

Built-in Values​

The base enum has no predefined values - all connection types are added through plugins.

Plugin Implementations​

Different plugins add their own connection types:

  • Admin Center Plugin: BC Admin Center
  • Automation Plugin: BC Automation API
  • NuGet Plugin: NuGet Package Feed
  • SMP Plugin: Service Management Portal

RequestState_TSL​

Represents the current state of a request in the processing queue.

Namespace: Theta.AdminHub.Client

Extensible: No

Values​

ValueDescription
Queued (0)Request is waiting to be processed by the job queue.
Processing (1)Request is currently being executed.
Completed (2)Request has been successfully processed.
Failed (3)Request encountered an error and could not be completed.

State Transitions​

Usage Example​

procedure SetUncompletedStateFilter()
begin
SetCurrentKey(State, ConnectionCode, TenantID, Method, Path);
SetFilter(State, '<>%1', RequestState_TSL::Completed);
end;

SourceProvider_TSL​

Defines how Business Central app packages (.app files) are stored and retrieved. This enum is extensible and implements the ISourceProvider_TSL interface.

Namespace: Theta.AdminHub.App

Extensible: Yes

Default Implementation: UndefinedSourceProvider_TSL

Values​

ValueCaptionImplementationDescription
Undefined (0)(empty)UndefinedSourceProvider_TSLNo source is defined for this app version.
Blob (1)BlobBlobSourceProvider_TSLApp package is stored in the database blob field.

Plugin Extensions​

Plugins can add custom source providers:

enumextension 50102 "NuGet Source Provider" extends SourceProvider_TSL
{
value(50102; NuGet)
{
Caption = 'NuGet Package';
Implementation = ISourceProvider_TSL = "NuGet Source Provider";
}
}

Usage in App Version​

var
AppVersion: Record AppVersion_TSL;
begin
AppVersion.SourceProvider := AppVersion.SourceProvider::Blob;
if AppVersion.HasSource() then
AppVersion.DownloadSource();
end;

ConnectionState_TSL​

Represents the state of a connection configuration.

Namespace: Theta.AdminHub.Client

Extensible: No

Values​

ValueDescription
NotConfiguredConnection has not been set up or is missing required configuration.
ActiveConnection is properly configured and ready to use.
DisabledConnection is configured but has been disabled by the user.

Usage​

Used to indicate whether a connection is ready for use in processing requests.

Environment Type​

Standard Business Central enum representing the type of environment.

Values​

ValueDescription
ProductionProduction environment containing live business data.
SandboxSandbox environment for testing and development.

This enum is used by the Admin Center plugin to identify environment types.

Http Method​

Standard REST Client enum for HTTP request methods.

Values​

ValueDescription
GETRetrieve data from the server.
POSTCreate new resources on the server.
PUTUpdate or replace existing resources.
PATCHPartially update existing resources.
DELETERemove resources from the server.

Usage in Requests​

var
Request: Record Request_TSL;
begin
Request.Method := Enum::"Http Method"::GET;
Request.Path := '/environments';
Request.Insert(true);
end;

OperationStatus_TSL​

Represents the status of a long-running operation in the Admin Center plugin.

Namespace: Theta.AdminHubBCAdminCenter.Environment

Extensible: No

Values​

ValueDescription
NotStartedOperation has been scheduled but not yet started.
RunningOperation is currently in progress.
SucceededOperation completed successfully.
FailedOperation failed with an error.
CanceledOperation was canceled by the user or system.
AbandonedOperation was abandoned due to timeout or system issues.

Usage​

Tracks the status of operations like environment updates or app installations through the BC Admin Center API.

UpdateAction_TSL​

Defines available actions for updating apps in tenant environments.

Namespace: Theta.AdminHubBCAdminCenter.Environment

Extensible: Yes

Implements: IUpdateAction_TSL

Values​

ValueDescription
InstallInstall a new version of the app.
ScheduleSchedule an app update for a future date.
UpToDateApp is already up to date (no action needed).
FailedPrevious update attempt failed.

Each value implements the IUpdateAction_TSL interface to provide action-specific behavior.