{"title":"AppSourceCop Hidden AS0073","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/analyzers/appsourcecop-as0073/","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/analyzers/appsourcecop-as0073, 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/analyzers/appsourcecop-as0073","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":"Attribute tag must be set.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"AppSourceCop Hidden AS0073","slug":"appsourcecop-hidden-as0073","at":0,"chars":4043},{"level":2,"title":"Description","slug":"description","at":56,"chars":42},{"level":2,"title":"Remarks","slug":"remarks","at":98,"chars":670},{"level":2,"title":"Setting up AppSourceCop to validate the Obsolete Tag","slug":"setting-up-appsourcecop-to-validate-the-obsolete-tag","at":768,"chars":799},{"level":2,"title":"How to fix this diagnostic?","slug":"how-to-fix-this-diagnostic","at":1567,"chars":515},{"level":2,"title":"Code examples triggering the rule","slug":"code-examples-triggering-the-rule","at":2082,"chars":807},{"level":3,"title":"Example 1 - Table marked as Obsolete Pending","slug":"example-1---table-marked-as-obsolete-pending","at":2119,"chars":269},{"level":3,"title":"Example 2 - Procedure marked as Obsolete","slug":"example-2---procedure-marked-as-obsolete","at":2388,"chars":251},{"level":3,"title":"Example 3 - Default interface method marked as RequiredPending without tag","slug":"example-3---default-interface-method-marked-as-requiredpending-without-tag","at":2639,"chars":250},{"level":2,"title":"Code examples not triggering the rule","slug":"code-examples-not-triggering-the-rule","at":2889,"chars":1007},{"level":3,"title":"Example 1 - Table marked as Obsolete Pending","slug":"example-1---table-marked-as-obsolete-pending-1","at":2930,"chars":359},{"level":3,"title":"Example 2 - Procedure marked as Obsolete","slug":"example-2---procedure-marked-as-obsolete-1","at":3289,"chars":323},{"level":3,"title":"Example 3 - Default interface method marked as RequiredPending with tag","slug":"example-3---default-interface-method-marked-as-requiredpending-with-tag","at":3612,"chars":284},{"level":2,"title":"Related information","slug":"related-information","at":3896,"chars":147}],"text":"# AppSourceCop Hidden AS0073\nAttribute tag must be set.\n## Description\nAttribute tag must be set.\n## Remarks\nThis rule validates that a tag is specified when using the ../attributes/devenv-obsolete-attribute or ../attributes/devenv-requiredpending-attribute attribute, or when setting the Obsolete State<../properties/devenv-obsoletestate-property> property. The tag provides tracking information such as the timeline of the deprecation or transition.\nFor Obsolete, the tag appears in the diagnostics AL0432 and AL0433 reported by the AL compiler. For RequiredPending, it appears in the AL0924 warning.\nThe format of the tag is not validated by the AL compiler. However, you can specify an expected format to be validated by the AppSourceCop. See appsourcecop-as0076.\n## Setting up AppSourceCop to validate the Obsolete Tag\nThe diagnostics for rule AS0073 are hidden by default, so you first have to use a ../devenv-rule-set-syntax-for-code-analysis-tools to surface them.\nFor example, the following ruleset turns the diagnostic for rule AS0073 into an error.\n```json\n{\n    \"name\": \"My custom ruleset\",\n    \"rules\": [\n        {\n            \"id\": \"AS0073\",\n            \"action\": \"Error\",\n            \"justification\": \"Validating that obsolete tags are specified is important\"\n        }\n    ]\n}\n```\n```json\n{\n    \"al.ruleSetPath\": \"custom.ruleset.json\"\n}\n```\n> NOTE\n> To fully validate obsolete properties and attributes, it is recommended to enable the rules appsourcecop-as0072, appsourcecop-as0073, appsourcecop-as0074, appsourcecop-as0075, and appsourcecop-as0076.\n## How to fix this diagnostic?\nWhen the property Obsolete State<../properties/devenv-obsoletestate-property> is used to mark an object as `Obsolete Pending` or `Obsolete Removed`, you need to also specify the property Obsolete Tag<../properties/devenv-obsoletetag-property>.\nWhen the attribute ../attributes/devenv-obsolete-attribute is used, you need to specify the obsolete tag attribute parameter.\nWhen the attribute ../attributes/devenv-requiredpending-attribute is used, you need to specify the Tag parameter.\n## Code examples triggering the rule\n### Example 1 - Table marked as Obsolete Pending\n```al\ntable 50100 MyTable\n{\n    ObsoleteState = Pending;\n    ObsoleteReason = 'This table has been deprecated for reason X. Use table Y instead.';\n\n    fields\n    {\n        field(50100; MyField; Integer) { }\n    }\n}\n```\n### Example 2 - Procedure marked as Obsolete\n```al\ncodeunit 50100 MyCodeunit\n{\n    [Obsolete('This procedure is being deprecated for reason X. Use procedure Y instead.')]\n    procedure MyProcedure()\n    begin\n        // Business logic.\n    end;\n}\n```\n### Example 3 - Default interface method marked as RequiredPending without tag\n```al\ninterface IMyInterface\n{\n    [RequiredPending('This method will become required.')]\n    procedure MyMethod(): Text\n    begin\n        exit('default');\n    end;\n}\n```\n## Code examples not triggering the rule\n### Example 1 - Table marked as Obsolete Pending\n```al\ntable 50100 MyTable\n{\n    ObsoleteState = Pending;\n    ObsoleteReason = 'This table is being deprecated for reason X. Use table Y instead.';\n    ObsoleteTag = 'This table is being deprecated with the newest build of the product.';\n\n    fields\n    {\n        field(50100; MyField; Integer) { }\n    }\n}\n```\n### Example 2 - Procedure marked as Obsolete\n```al\ncodeunit 50100 MyCodeunit\n{\n    [Obsolete('This procedure is being deprecated for reason X. Use procedure Y instead.', 'This table is being deprecated with the newest build of the product.')]\n    procedure MyProcedure()\n    begin\n        // Business logic.\n    end;\n}\n```\n### Example 3 - Default interface method marked as RequiredPending with tag\n```al\ninterface IMyInterface\n{\n    [RequiredPending('This method will become required. Add your implementation now.', '26.0')]\n    procedure MyMethod(): Text\n    begin\n        exit('default');\n    end;\n}\n```\n## Related information\nAppSourceCop Analyzer<appsourcecop>\nGet Started with AL<../devenv-get-started>\nDeveloping Extensions<../devenv-dev-overview>"}