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
[Obsolete([Reason: Text] [, Tag: Text])]
Arguments
[Optional] Reason
Type: Text
Specifies the reason for the symbol being deprecated.
[Optional] Tag
Type: Text
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 ObsoleteState Property and ObsoleteReason Property.
Example
Setting the attribute on a method or a variable. Each method must be marked with [Obsolete('<Reason>','<tag>')]
.
codeunit 50143 SoonObsolete
{
[Obsolete('Pending removal use X instead', '17.0')]
procedure MyProcedure()
var
myInt: Integer;
begin
// Make something happen
end;
}
See Also
AL Method Reference
Method Attributes
Directives in AL
Best Practices for Deprecation of Code in the Base App
ObsoleteState Property
ObsoleteReason Property
ObsoleteTag Property
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin