# Scope attribute
> Version: _Available or changed with runtime version 1.0._
Specifies the scope of a method.
## Applies to
 Method
## Syntax
```al
[Scope(Kind: Text)]
```
### Arguments
Kind
Type: ../methods-auto/text/text-data-type
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
> Earlier scope values are deprecated. Use OnPrem instead of Solution or Internal. Use Cloud instead of Personalization or Extension.
See ../devenv-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.
```al
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;

```
## Related information
AL Method Reference<../methods-auto/library>
devenv-method-attributes
../devenv-json-files
../properties/devenv-access-property
../properties/devenv-extensible-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-scope-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-scope-attribute/
