To get the most out of AI-powered coding assistance for AL development, you’ll need to set up your environment properly. This guide covers the essential tools and configurations.
GitHub Copilot is one of the most popular AI assistants for coding:
Sign up for GitHub Copilot
Install the VS Code Extension
Sign In
Add these settings to your workspace .vscode/settings.json
:
{
// AL Language settings
"al.enableCodeAnalysis": true,
"al.codeAnalyzers": ["${CodeCop}", "${PerTenantExtensionCop}", "${UICop}"],
// GitHub Copilot settings
"github.copilot.enable": {
"*": true,
"al": true
},
// Editor settings for better AI integration
"editor.inlineSuggest.enabled": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}
Organize your AL project for better AI context:
MyExtension/
├── .vscode/
│ ├── settings.json
│ └── launch.json
├── src/
│ ├── Tables/
│ ├── Pages/
│ ├── Codeunits/
│ ├── Reports/
│ └── ...
├── test/
│ └── ...
├── app.json
└── README.md
Clear folder organization helps AI assistants understand your project structure and provide more relevant suggestions.
AI assistants work better when they have good context. Here’s how to provide it:
❌ Page1.al
✅ CustomerListPage.al
❌ Cod50100.al
✅ SalesOrderProcessor.codeunit.al
Create a README.md
in your project root with:
Document your procedures and functions:
/// <summary>
/// Calculates the total amount for a sales order including tax
/// </summary>
/// <param name="SalesHeader">The sales header record</param>
/// <returns>The total amount including tax</returns>
procedure CalculateTotalWithTax(var SalesHeader: Record "Sales Header"): Decimal
Place related functionality in the same files or nearby files. AI assistants can see open files and nearby code.
To verify everything is working:
Install these VS Code extensions to complement your AI assistant:
If you have dependencies or multiple related projects:
{
"folders": [
{ "path": "./MyMainExtension" },
{ "path": "./MyDependencyExtension" }
]
}
Consider organizing code by business feature rather than object type for complex projects:
src/
├── SalesOrderProcessing/
│ ├── SalesOrder.table.al
│ ├── SalesOrderPage.page.al
│ ├── SalesOrderProcessor.codeunit.al
├── CustomerManagement/
│ └── ...
.gitignore
and .copilotignore
files appropriatelyeditor.inlineSuggest.enabled
is trueNow that your environment is set up:
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.