Develop AL extensions for Dynamics 365 Business Central
✓Works with OpenClaudeYou are a Dynamics 365 Business Central AL developer. The user wants to develop AL extensions that extend Business Central functionality, create custom objects, and integrate business logic into the ERP system.
What to check first
- Run
code --versionand verify VS Code is installed with the AL Language extension (Microsoft.AL) - Check
az bicep versionto confirm Azure CLI tools are available for deployment - Verify Business Central instance URL and credentials in your launch.json configuration
Steps
- Create a new AL project using
al go projectcommand or the AL: New Project command palette in VS Code - Define your object type in the AL file (Table, Page, Report, Codeunit, Interface, or Enum) with the correct object ID range for your extension
- Declare fields in Table objects with proper DataType (Code, Text, Integer, Decimal, Date, Boolean, BLOB, etc.) and add properties like Caption and Tooltip
- Create a Page object with SourceTable pointing to your Table, add repeater controls with field bindings
- Implement business logic in a Codeunit using trigger procedures (OnInsert, OnModify, OnDelete, OnRename) and custom methods
- Configure the app.json manifest file with name, version, publisher, and dependencies on base application
- Use
al: Runoral: Packagecommands to build and deploy to your Business Central sandbox environment - Test using the Business Central web client by accessing the newly created pages and validating data operations
Code
// MyCustomTable.Table.al
table 50100 "My Custom Table"
{
DataClassification = CustomerContent;
Caption = 'My Custom Table';
fields
{
field(1; "Primary Key"; Code[20])
{
Caption = 'Primary Key';
DataClassification = SystemMetadata;
}
field(2; "Description"; Text[100])
{
Caption = 'Description';
DataClassification = CustomerContent;
}
field(3; "Amount"; Decimal)
{
Caption = 'Amount';
DataClassification = CustomerContent;
}
field(4; "Status"; Enum "My Status Enum")
{
Caption = 'Status';
DataClassification = CustomerContent;
}
}
keys
{
key(PK; "Primary Key")
{
Clustered = true;
}
}
trigger OnInsert()
begin
ValidateAmount();
end;
procedure ValidateAmount()
begin
if Amount < 0 then
Error('Amount cannot be negative');
end;
}
// MyStatusEnum.Enum.al
enum 50100 "My Status Enum"
{
Extensible = true;
value(0; "Open") { Caption = 'Open'; }
value(1; "In Progress") { Caption = 'In Progress';
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Dynamics 365 Skills
Other Claude Code skills in the same category — free to download.
Dynamics 365 Plugin
Build C# plugins with pre/post operation steps and execution pipeline
D365 Power Automate
Create Power Automate flows for Dynamics 365 automation
D365 Model-Driven App
Build model-driven apps with forms, views, and business rules
D365 Web Resources
Create JavaScript web resources for form customization
D365 FetchXML
Write FetchXML queries for advanced data retrieval and reporting
D365 Finance & Operations
Develop X++ customizations for Dynamics 365 Finance & Operations
D365 PCF Control
Build Power Apps Component Framework custom controls
D365 Dataverse API
Interact with Dataverse Web API for CRUD and batch operations
Want a Dynamics 365 skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.