title | description | ms.author | ms.date | ms.tgt_pltfrm | ms.topic | author |
---|---|---|---|---|---|---|
AppSourceCop Warning AS0075 |
Obsolete Reason must be set. |
solsen |
02/26/2024 |
na |
reference |
SusanneWindfeldPedersen |
Obsolete Reason must be set.
Obsolete Reason must be set.
When an object, element, variable or procedure is marked as obsolete, you should also specify an obsolete reason. The obsolete reason can be used to provide valuable information, such as the reason for the obsoletion or a workaround to achieve the same goal, to developers that are referencing it. The obsolete reason appears in the message of the diagnostics AL0432 and AL0433 reported by the AL compiler when referencing obsolete elements.
When the property Obsolete State is used to mark an object as Obsolete Pending
or Obsolete Removed
, you need to also specify the property Obsolete Reason.
When the attribute Obsolete is used, you need to specify the obsolete reason attribute parameter.
table 50100 MyTable
{
ObsoleteState = Pending;
fields
{
field(50100; MyField; Integer) { }
}
}
codeunit 50100 MyCodeunit
{
[Obsolete]
procedure MyProcedure()
begin
// Business logic.
end;
}
table 50100 MyTable
{
ObsoleteState = Pending;
ObsoleteReason = 'This table is being deprecated for reason X. Use table Y instead.';
fields
{
field(50100; MyField; Integer) { }
}
}
codeunit 50100 MyCodeunit
{
[Obsolete('This procedure is being deprecated for reason X. Use procedure Y instead.')]
procedure MyProcedure()
begin
// Business logic.
end;
}
AppSourceCop Analyzer
Get Started with AL
Developing Extensions