{"title":"Scope attribute","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-scope-attribute/","by":"JOP-AL","license":"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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-scope-attribute","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Specifies the scope of a method.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":93,"chars":22},{"level":2,"title":"Syntax","slug":"syntax","at":115,"chars":1201},{"level":3,"title":"Arguments","slug":"arguments","at":155,"chars":1161},{"level":4,"title":"Value","slug":"value","at":241,"chars":1075},{"level":2,"title":"Example","slug":"example","at":1316,"chars":437},{"level":2,"title":"Related information","slug":"related-information","at":1753,"chars":191}],"text":"> Version: _Available or changed with runtime version 1.0._\nSpecifies the scope of a method.\n## Applies to\n Method\n## Syntax\n```al\n[Scope(Kind: Text)]\n```\n### Arguments\nKind\nType: ../methods-auto/text/text-data-type\nThe scope of the method.\n#### Value\nValue|Compatibility\nSolution|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.\"\nPersonalization|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.\"\nExtension|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.\"\nInternal|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.\"\nCloud|Available or changed with runtime version 4.0.\nOnPrem|Available or changed with runtime version 4.0.\n> NOTE\n> Earlier scope values are deprecated. Use OnPrem instead of Solution or Internal. Use Cloud instead of Personalization or Extension.\nSee ../devenv-compilation-scope-overview.\n## Example\nMethods use the Cloud scope by default. Add `[Scope('OnPrem')]` only to methods that require APIs available exclusively to on-premises extensions.\n```al\nprocedure MyProcedureForCloud()\nbegin\n    Message('My procedure is available in the cloud but cannot call an on-premises method.');\nend;\n\n[Scope('OnPrem')]\nprocedure MyProcedureForOnPrem()\nbegin\n    Message('My procedure is not available to a cloud extension.');\nend;\n\n```\n## Related information\nAL Method Reference<../methods-auto/library>\ndevenv-method-attributes\n../devenv-json-files\n../properties/devenv-access-property\n../properties/devenv-extensible-property"}