Rules, guidelines, and best practices
Rules, guidelines, and best practices for Business Central AL development. It covers deprecating objects, methods, symbols, and external business events, plus best practices for coding, testing, performance, security, telemetry, and Marketplace validation.
Path: Development > Rules, guidelines, and best practices · tier official · system development · narrative unreviewed (model text not yet checked)
Overview
This section collects the rules a developer follows when building and maintaining Business Central extensions. Two pages on its own deal with obsoleting: one on marking objects, methods, and symbols as obsolete in AL, and one on deprecating external business events.
The obsoleting guide explains the ObsoleteState, ObsoleteReason, and ObsoleteTag properties, the [Obsolete] attribute, preprocessor directives, and the analyzer rules that enforce them. The external business events page builds on this. It shows how to mark an event as obsolete pending first, then remove it in a later version, so external integrations can move to a replacement event. It mentions version 27.0.
The Best practices subtopic (16 pages) covers the wider development lifecycle. Topics include AL code conventions, restrictions to avoid, testing, performance, security, telemetry, and connectivity app requirements. Start there for guidance on getting an app through Marketplace validation. Start with the obsoleting pages when you need to retire code without breaking dependent extensions or integrations.
Key points
- Obsolete AL objects, methods, and symbols with the ObsoleteState, ObsoleteReason, and ObsoleteTag properties or the [Obsolete] attribute.
- Analyzer rules and preprocessor directives help enforce and manage obsolete code.
- External business events are deprecated in two steps: mark them obsolete pending, then remove them in a future version.
- The external business events deprecation page uses the Obsolete and ExternalBusinessEvent attributes, a DisplayName prefix, and event versioning. It refers to version 27.0.
- Deprecating events this way lets external integrations move to replacement events.
- The Best practices subtopic has 16 pages on AL code conventions, restrictions to avoid, testing, performance, security, and telemetry.
- It also covers connectivity app requirements and how to publish apps that pass Marketplace validation.
Subtopics
- Best practices (16 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.
- #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”
- #276 Minor consistency fixes: bc-version format, CI permissions, community skill retrieval (code change): “Minor consistency improvements to quality rules documentation”
- #281 fix: align READ domain examples and the event parameter addition article (code change): “corrected guidance on event parameter additions to align with AppSourceCop”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 18 Learn pages
- learnAdding Telemetry to Your Business Central Application2026-11-17
- learnAzure Key Vaults with Business Central2026-10-08
- 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 Extension2026-11-30
- learnDeprecate external business events2025-07-02
- learnHow to work with a performance problem2026-09-18
Show 10 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 code2026-12-01
- learnTest the advanced sample extension2026-12-01
- learnTesting your extension2023-04-11