
Business Central SaaS Extension Design: Implementing Plant Tracking with AL Event Subscribers
In many manufacturing and service-oriented organizations, sales transactions need to be associated with a Plant (or operational unit).

Business Central SaaS Extension from Scratch (Repo-backed, Azure DevOps)
Business Central SaaS Extension from Scratch (Repo-backed, Azure DevOps)
Prerequisites (must be done once per laptop)
Part A — Create the Azure DevOps Repo (Empty)
Step A1 — Create a new project (only if needed)
If you already have a DevOps Project, skip this.
Step A2 — Create an empty Git repository
✅ Result: Repo page shows: “repo is empty”.
Part B — Clone Repo to Your PC
Step B1 — Create a local working folder
Example:
Step B2 — Clone the empty repo
Choose either method:
Option 1 (simple): Clone in VS Code
Option 2: Clone using Git command line
✅ Result: Local folder contains a .git folder and nothing else.
Part C — Add .gitignore (Before generating AL project)
Step C1 — Create .gitignore at repo root
Create file here:
Paste this content:
# Business Central / AL generated artifacts
.alpackages/
.alcache/
.snapshots/
*.app
# VS Code (keep only shared config)
.vscode/*
!.vscode/launch.json
!.vscode/settings.json
# OS files
.DS_Store
Thumbs.db
Step C2 — Commit and push .gitignore
In VS Code Source Control:
✅ Repo now has 1 commit.
Part D — Create the AL Project (Scaffold) in the Repo
Key rule (IMPORTANT)
✅ The folder you select for AL: Go! must NOT exist yet.
We will generate the AL project into a new folder called src.
Step D1 — Run AL: Go!
✅ Result: VS Code creates src folder and generates project files inside.
Part E — Configure the BC SaaS Connection (launch.json)
Step E1 — Open the generated launch.json
File path:
Replace content with your SaaS sandbox config (example):
{
"version": "0.2.0",
"configurations": [
{
"name": "BC SaaS Sandbox",
"type": "al",
"request": "launch",
"server": "https://businesscentral.dynamics.com",
"tenant": "7f9c2a8e-4b6d-4c3a-9e51-0d2a9b8c6f41",
"environmentName": "Sandbox",
"authentication": "MicrosoftEntraID",
"startupObjectType": "Page",
"startupObjectId": 22,
"breakOnError": "All",
"launchBrowser": true
}
]
}
Note: "tenant": "7f9c2a8e-4b6d-4c3a-9e51-0d2a9b8c6f41" provided here is only for illustration; a valid tenant id must be provided here.
✅ This ensures it uses SaaS + Entra ID, not On-Prem.
Part F — Set app.json Correctly (Runtime, IDs, name)
Step F1 — Edit app.json
File path:
Set these fields clearly:
Example:
{
"id": "YOUR-GUID-HERE",
"name": "BCExtension-01",
"publisher": "MicroCloud 360",
"version": "1.0.0.0",
"brief": "Business Central Extension 01",
"description": "Business Central SaaS Extension",
"dependencies": [],
"idRanges": [
{ "from": 50100, "to": 50149 }
],
"runtime": "17.0",
"features": [ "NoImplicitWith" ]
}
✅ (Use a new GUID for each app—AL usually generates it for you.)
Part G — Download Symbols (Required before coding properly)
Step G1 — Download Symbols
✅ Result:
Part H — Build + Publish to BC SaaS Sandbox
Step H1 — Publish from VS Code
You will be asked to login (browser sign-in) the first time.
✅ Result:
Part I — Verify in Business Central
Step I1 — Confirm extension is installed
In BC:
Step I2 — If fields/pages not visible
If you added fields to a page extension:
Part J — Commit Code to Repo (Proper workflow)
Step J1 — Commit generated project + config
In VS Code Source Control:
✅ Now your repo contains the full AL project.
Part K — Work from Another Laptop (Proves repo-backed setup)
On a second laptop:
✅ Same project works anywhere.

Premanath Kumarage
Author

In many manufacturing and service-oriented organizations, sales transactions need to be associated with a Plant (or operational unit).

Here’s a battle-tested, simple structure for one repo hosting many Business Central extensions, plus a clean naming/ID/range/versioning standard that won’t hurt you later when you add CI/CD.

Below is a clear, side-by-side comparison of NAV NAS vs Business Central Job Queue, written in plain language, plus a visual flow diagram you can embed in your blog. This is ideal for developers and consultants transitioning from NAV to Business Central.
Start here
A working session, not a sales call. Bring the process your current system fights you on, and we will tell you plainly what it would take to fix it.
Newsletter
Stay ahead with Microsoft Business Applications.
Insights, implementation advice and practical ideas to help your business get more from Microsoft technology.
By subscribing, you acknowledge MicroCloud 360’s Privacy Policy.