# Obsolete attribute
> Version: _Available or changed with runtime version 4.0._
Specifies that the annotated symbol will be deprecated.
## Applies to
 Method
 DeclareMethod
 Variable
 Event
## Syntax
```al
[Obsolete([Reason: Text] [, Tag: Text])]
```
### Arguments
*[Optional] Reason*
Type: ../methods-auto/text/text-data-type
Specifies the reason for the symbol being deprecated.
*[Optional] Tag*
Type: ../methods-auto/text/text-data-type
Specifies a free-form text to support tracking of where and when the object was marked as obsolete, for example, branch, build, or date of obsoleting the object.
## Remarks
To mark objects and other elements of code, use the ../properties/devenv-obsoletestate-property and ../properties/devenv-obsoletereason-property.
## Example
Apply `[Obsolete('<Reason>', '<Tag>')]` to each method or variable that you want to mark as obsolete.
```al
codeunit 50143 SoonObsolete
{
    [Obsolete('Pending removal. Use X instead.', '17.0')]
    procedure MyProcedure()
    begin
        // Add the method implementation.
    end;
}

```
## Related information
AL Method Reference<../methods-auto/library>
devenv-method-attributes
../directives/devenv-directives-in-al
Best Practices for Deprecation of Code in the Base App<../devenv-deprecation-guidelines>
../properties/devenv-obsoletestate-property
../properties/devenv-obsoletereason-property
../properties/devenv-obsoletetag-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-obsolete-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-obsolete-attribute/
