Scope attribute

Version: Available or changed with runtime version 1.0.

Specifies the scope of a method.

Applies to

  • Method

Syntax

[Scope(Kind: Text)]

Arguments

Kind
Type: Text
The scope of the method.

Value

ValueCompatibility
SolutionAvailable or changed with runtime version 1.0 until version 4.0 where it was deprecated for the following reason: "The Solution scope is being deprecated. Use OnPrem instead."
PersonalizationAvailable or changed with runtime version 1.0 until version 4.0 where it was deprecated for the following reason: "The Personalization scope is being deprecated. Use Cloud instead."
ExtensionAvailable or changed with runtime version 1.0 until version 4.0 where it was deprecated for the following reason: "The Extension scope is being deprecated. Use Cloud instead."
InternalAvailable or changed with runtime version 1.0 until version 4.0 where it was deprecated for the following reason: "The Internal scope is being deprecated. Use OnPrem instead."
CloudAvailable or changed with runtime version 4.0.
OnPremAvailable or changed with runtime version 4.0.

Note


Earlier scope values are deprecated. Use OnPrem instead of Solution or Internal. Use Cloud instead of Personalization or Extension.

Learn more in Compilation Scope Overview.

Example

Methods use the Cloud scope by default. Add [Scope('OnPrem')] only to methods that require APIs available exclusively to on-premises extensions.

procedure MyProcedureForCloud()
begin
    Message('My procedure is available in the cloud but cannot call an on-premises method.');
end;

[Scope('OnPrem')]
procedure MyProcedureForOnPrem()
begin
    Message('My procedure is not available to a cloud extension.');
end;

AL Method Reference
Method Attributes
JSON Files
Access Property
Extensible Property