Upgrading AL code across Business Central versions

By Emil Björk · Microsoft business apps consultant, Gothenburg

How to keep AL extensions working through Business Central's twice-yearly release waves — breaking changes, deprecations, and code migration patterns.

Reviewed May 20262 min read · 422 wordsPublished
On this page (7)

Business Central updates twice a year, and the platform underneath an AL extension changes with each wave. Most extensions survive without intervention, but the ones that don't fail spectacularly — sometimes silently. The strategy is to test early, fix deprecations as they're announced, and never skip a wave on production code.

What can break

Microsoft does not change its own database table fields, IDs, or method signatures lightly, but it does:

  • Mark fields and methods as obsolete with the [Obsolete(...)] attribute, ahead of removing them. Obsolete code still compiles but emits warnings.
  • Remove fields and methods that have been obsolete for at least two waves.
  • Change the default implementation of a method (signature stays the same, behaviour changes).
  • Add fields to standard tables — usually safe, unless your extension assumed a fixed schema.
  • Change the runtime version required by the platform, forcing extensions to bump their runtime in app.json.

The compatibility commitment

Microsoft documents breaking changes per wave in the Application BreakingChanges.md file in the BC GitHub repo. Any field, method, or behaviour deprecation goes through a published warning period before removal — extensions that act on the warnings stay safe.

The upgrade workflow.

  1. Six weeks before GA, install the preview build into a sandbox.
  2. Pull the new symbols in VS Code (AL: Download symbols). The compiler now sees the new platform.
  3. Build. Warnings flag deprecated symbols; errors flag genuinely broken code.
  4. Fix and refactor — replace obsolete APIs with current ones, adjust to behavioural changes.
  5. Run tests (you do have an automated AL test suite; see the test framework guide).
  6. Republish to the sandbox, then to UAT, then to production along with the platform update.

Data upgrade codeunits

Schema-changing extensions need upgrade codeunits that migrate stored data when the new version installs — e.g. moving values from a removed field to a replacement. Microsoft's documentation has the boilerplate.

Per-tenant extensions (PTEs)

PTEs are the most upgrade-fragile because Microsoft does not pre-test them. Treat every wave as a maintenance task on every PTE.

AppSource apps

Microsoft runs your AppSource app against preview builds and notifies you if it fails. You still have to fix it, but the surface signal is automatic.

Don't skip waves

Skipping makes the next upgrade worse, not better.

Where to go next

The cadence you are upgrading against is release waves; the diagnostics you will read are in AL compiler errors. Tests that catch behavioural change are the AL test framework, automation is AL-Go CI/CD, and the safety net AppSource adds is in per-tenant extensions vs AppSource.

Frequently asked questions

What can break an AL extension on a release wave?

Fields and methods removed after at least two waves of obsolete warnings, changed default implementations behind unchanged signatures, new fields on standard tables that break fixed-schema assumptions, and runtime version bumps that force an app.json change.

How do I test an extension against the next version?

About six weeks before general availability, install the preview build in a sandbox, download the new symbols in VS Code, build and act on obsolete warnings, run the AL test suite, then republish to sandbox, UAT, and production alongside the platform update.

Where does Microsoft publish breaking changes?

In the Application BreakingChanges.md file in the Business Central GitHub repository. Every deprecation goes through a published warning period before removal.

Why are per-tenant extensions the most fragile?

Microsoft does not pre-test them, unlike AppSource apps which are run against preview builds automatically. Treat every wave as a maintenance task on every per-tenant extension, and never skip a wave.

Further reading

Related guides

Browse every guide in Business Central or just AL & development.

Was this helpful?

Signals which guides land and which need work. No account, no comment box — corrections go through the contact page.

Spot something wrong or want a topic covered? Send a correction or a topic request — both are welcome.