Édition

Partage via


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

Value Compatibility
Solution Available 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."
Personalization Available 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."
Extension Available 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."
Internal Available 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."
Cloud Available or changed with runtime version 4.0.
OnPrem Available or changed with runtime version 4.0.

Note

In previous versions OnPrem was equivalent to Internal and Cloud was equivalent to External. Both Internal and External options are being deprecated.

For more information, see Compilation Scope Overview.

Example

Setting the attribute on a method. Each method must be explicitly marked with [Scope('OnPrem')] because default is [Scope('Cloud')].

procedure MyProcedureForCloud()
    begin
        Message('My procedure is available in cloud, but cannot call any onprem 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