In this video, I building a tool for myself, when I need to do support tasks. Support is an area where Business Central is lacking good tools. Tools to help manipulate data, fix mistakes or perhaps do bulk changes. This tool will help me every time I need to perhaps any of these tasks.

In this video, Erik demonstrates a powerful tool he’s been building for Business Central supporters — an in-client AL code workbench that lets you write and execute AL code on the fly, without the need to deploy extensions. This builds on his previous project where he built an AL compiler in AL, and now he’s putting it to practical use solving real-world support scenarios.
The Support Problem Every BC Consultant Knows
If you’ve ever worked in a support role for NAV or Dynamics 365 Business Central, you’ve encountered this scenario: a customer calls and says something like, “Erik, we posted this sales invoice with the wrong contact name. Can you please change it so we can print the correct name and get paid?”
It’s a totally innocent change — a single field on a posted document. But due to the way Business Central is designed, you’re not allowed to just edit it. In the old NAV days, you could open the table, change the field, and be done. But in the cloud-based world, the “proper” solution involves:
- Creating or modifying an extension
- Writing codeunit logic to make the change
- Deploying to a sandbox first
- Testing it
- Publishing to production
That’s a lot of overhead for what should be a simple data correction. This is the problem Erik set out to solve.
The AL Workbench
The tool Erik is building — tentatively called the “AL Workbench” — is a page within Business Central that has three main areas:
- Left panel: An AL code editor where you write your script
- Center panel: A simple lookup functionality for tables and fields
- Right panel: Program output and execution results
The idea is simple: write a small AL program directly in the client, run it immediately, and see the results — no deployment cycle needed. This is powered by the AL compiler Erik built entirely in AL, which he demonstrated in a previous video.
Example 1: Changing a Field on a Posted Sales Invoice
Erik walks through the first support scenario — changing the “Sell-to Contact” on a posted sales invoice. In the workbench, he writes something like this:
var
PS: Record "Sales Invoice Header";
begin
PS.Get('215');
// First, verify we have the right record
Message('%1', PS."Sell-to Contact");
end;
He runs the code and confirms it returns “Robert Towns” — matching what he sees on the invoice. Now, with confidence that he’s touching the right record, he modifies the program:
var
PS: Record "Sales Invoice Header";
begin
PS.Get('215');
PS."Sell-to Contact" := 'Erik';
PS.Modify();
end;
He hits run, goes back to the sales invoice, presses F5, and the contact name is updated. No extension deployment. No sandbox testing. Done in seconds.
Archiving Snippets for Reuse
After completing the task, Erik archives the code as a snippet called “Change contact on sales invoice.” The next time a similar request comes in, he can load this snippet and adapt it rather than writing from scratch. The tool includes a snippet management system with:
- A blank snippet template for starting fresh
- The ability to save and name snippets
- A list of previously saved snippets to load
Erik notes that while he’s “not a huge fan of snippets” in general, the term fits well here for these small, reusable support scripts.
Example 2: Bulk Updating Customer Records
The second example demonstrates a more complex scenario: a customer asks Erik to assign a responsibility center to all their customers. Instead of the customer manually editing hundreds or thousands of records, Erik writes a quick loop:
var
Cust: Record Customer;
begin
if Cust.FindSet() then
repeat
Cust.Validate("Responsibility Center", 'ABC');
Cust.Modify();
until Cust.Next() = 0;
end;
He runs it, and all customers are updated. Then the customer comes back with a refinement: “Actually, only customers with ‘ski’ in the name should get the ‘DF’ responsibility center.” Erik adds a filter:
var
Cust: Record Customer;
begin
Cust.SetFilter(Name, '*ski*');
if Cust.FindSet() then
repeat
Cust.Validate("Responsibility Center", 'DF');
Cust.Modify();
until Cust.Next() = 0;
end;
Run it again, go back and refresh — only the matching customers are updated. This kind of iterative, interactive data manipulation is exactly what the tool is designed for.
The Lookup Functionality
The center panel of the workbench provides a lookup for tables and fields. When you select a field from the lookup, it gets pasted into your source code — similar to IntelliSense but built right into the Business Central page. Erik acknowledges this is still a work in progress (he ran into some issues during the demo) and mentions he should add a field search function to make finding fields easier.
The Source Code Behind the Scenes
The project is set up as a standard AL extension. Here’s the app.json configuration:
{
"id": "3c526bbf-3a6e-4a36-ae37-5eebeabc0bb5",
"name": "AlWishList",
"publisher": "Default Publisher",
"version": "1.0.0.0",
"platform": "1.0.0.0",
"application": "27.0.0.0",
"idRanges": [
{
"from": 50100,
"to": 50149
}
],
"runtime": "14.0",
"features": [
"NoImplicitWith"
]
}
The included HelloWorld.al file shows some of the experimentation Erik was doing while building the tool — working with RecordRef, JsonObject, HttpContent, and other types that likely feed into the workbench’s ability to dynamically interact with records and data:
pageextension 50100 CustomerListExt extends "Customer List"
{
trigger OnOpenPage();
var
HttpContent: HttpContent;
JO: JsonObject;
JA: JsonArray;
T: JsonToken;
Txt: Text;
C: Code[100];
Ref: RecordRef;
begin
Txt := '12345678';
Rec.TransferFields();
message(Txt.Substring(-3));
end;
}
Future Ideas
Erik shares some ideas for where this tool could go:
- Web service-based snippet library: The snippet list could be backed by a web service, allowing a team of supporters to share a common pool of support scripts across multiple customer environments.
- Field search functionality: Adding search capabilities to the field lookup to make it easier to find the right field without scrolling through long lists.
- Potential app distribution: While Erik isn’t sure this is AppSource material, he acknowledges it could become an app in some form if there’s enough interest from the community.
Summary
Erik’s AL Workbench is a practical evolution of his AL-in-AL compiler project — turning a “can it be done?” experiment into a genuine productivity tool for Business Central support. By enabling supporters to write, execute, and archive small AL programs directly within the client, it eliminates the painful deploy-test-publish cycle that makes simple data corrections disproportionately time-consuming. Whether it’s changing a single field on a posted document or bulk-updating thousands of customer records, the workbench brings back the kind of direct, interactive data manipulation that many consultants have missed since moving away from NAV’s on-premises world. Erik is keen to hear from the community about how others would use a tool like this — so if you have ideas, drop them in the comments.