Rules, guidelines, and best practices
Rules, guidelines, and best practices for Business Central extension development: how to obsolete AL objects, methods and symbols, how to deprecate external business events, and a Best practices subtopic on AL conventions, testing, performance, security, telemetry and Marketplace preparation.
Path: Development > Rules, guidelines, and best practices · tier official · system development · narrative reviewed (checked by Opus)
Overview
This section collects the rules developers follow when building and maintaining Business Central extensions. Two pages sit directly in the hub and deal with lifecycle changes. One covers marking AL objects, methods and symbols as obsolete. The other covers deprecating external business events so that integrations are informed and move to replacement events.
The Best practices subtopic (17 pages) covers the wider craft: AL code conventions and restrictions, testing, performance, security, telemetry, connectivity app requirements and documenting user scenarios. It also helps with preparing an extension for Marketplace validation.
Start with the obsolete AL page if you need to retire code in an extension. Use the external business events page if the change affects outside integrations. Go to Best practices for general questions on writing, testing, securing and publishing extensions.
Key points
- Obsoleting in AL uses the ObsoleteState, ObsoleteReason and ObsoleteTag properties or the [Obsolete] attribute.
- Analyzer rules enforce obsoletion, and preprocessor directives are part of the obsoletion guidance.
- External business events are deprecated by first marking them obsolete pending, then removing them in a future version.
- Deprecating an external business event involves the Obsolete and ExternalBusinessEvent attributes, a DisplayName prefix and event versioning. The page references version 27.0.
- The deprecation process is meant to keep external integrations informed and moving to replacement events.
- Best practices (17 pages) covers AL code conventions, restrictions, testing, performance, security and telemetry.
- Best practices also covers connectivity app requirements, user scenario documentation and preparing for Marketplace validation.
Subtopics
- Best practices (17 pages)
More Learn pages
- Deprecate external business events: Learn how to deprecate external business events in AL for Business Central.
- Obsolete objects, methods, and symbols in AL: Description of how you use the obsoletion properties and attributes to obsolete an object, a method, or other symbols used in AL for Business Central.
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #10878 Ruleset hardening: promote five low-risk rules to Error (code change): “Ruleset hardening: promote five low-risk rules to Error”
- #11036 Ruleset hardening: promote four compatibility rules to Error (code change): “Pragmas are narrowly scoped to actual violations found in analyzer diagnostics”
- #9865 [Main] - ‘Greater Than’ Withholding Tax Calculation Rule is not app… (code change): “The withholding tax calculation now respects the configured calculation rule”
- #9905 [Bug][SubscriptionBilling] Contract lines of type G/L Account never post to the selected G/L account (code change): “Contract lines of type G/L Account now post to the G/L account specified on the line”
- #146 knowledge: three false-positive guards from BCApps PR 10277, 10278 and 10346 (code change): “AppSource affix requirement now correctly scoped to apps with AppSourceCop enabled”
- #153 Promote knowledge for Microsoft-owned review skills (code change): “Moves 29 knowledge articles and 56 companion samples used by Microsoft-endorsed review skills”
- #156 18 AL/BC patterns: style, data-modeling, web-services, appsource, breaking-changes, performance, testing (code change): “Adds 17 AL/BC knowledge articles with good and bad samples across style, data modeling, web services”
- #157 18 more AL/BC patterns: data-modeling, testing, style, security, error-handling, ui, upgrade, web-services, appsource (code change): “BCQuality adds 18 new knowledge articles covering data modeling, testing, style, security, error handling”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 19 Learn pages
- learnAzure Key Vaults with Business Central2021-04-01
- learnBe careful about UI for web services2023-04-11
- learnBest practices for AL code2026-02-19
- learnBest Practices for Deprecation of AL Code2024-04-30
- learnBuilding an Advanced Sample Extension2022-12-29
- learnDeprecate external business events2025-07-02
- learnDeveloping telemetry into your Business Central application2024-02-09
- learnHow to work with a performance problem2026-09-18
Show 11 more
- learnLayered security model in Business Central2025-11-19
- learnMoving from OnCompanyOpen2022-05-23
- learnObsolete objects, methods, and symbols in AL2025-08-20
- learnPerformance Articles for AL Developers2026-09-18
- learnPrefix and suffix for naming in extensions2023-04-11
- learnReplacing OnBeforeCompanyOpen and OnAfterCompanyOpen2024-05-01
- learnRequirements for connectivity apps2023-05-23
- learnRules and guidelines for AL code2023-04-11
- learnTest the advanced sample extension2026-03-16
- learnTesting your extension2023-04-11
- learnUser scenario documentation2023-04-11