BC Copilot in AL: Practical Tips for Daily Development
GitHub Copilot has changed how many of us write code. But AL development has some quirks that require a bit more intentional setup to get the most out of it.
Here’s what’s working for us.
1. Use a .github/copilot-instructions.md
The first thing any BC developer should do is add a copilot-instructions.md to their repo.
This file tells Copilot about your project’s ID range, suffix, namespace, and conventions.
## AL Conventions
- Suffix: BCH
- ID Range: 70000..70999
- Namespace: BCCopilotHangar
- Always use `Error(ErrorInfo)` pattern — never bare `Error(text)`
2. Lean on MCP Servers
The BC community has built incredible MCP servers that inject real BC knowledge into your AI context:
- BC Code Intelligence MCP — Business Central specialists, AL patterns, documentation, and codebase-aware help in one MCP.
- Context7 — current library and framework documentation injected directly into the AI workflow.
- Microsoft Learn Docs MCP — official Microsoft documentation made available through MCP.
3. Agentic Coding for Complex Objects
For building a full feature (table + page + codeunit), don’t ask Copilot one file at a time. Describe the whole feature in one shot:
“Create a BC extension with a table
Item Popularity Entry(id 70010), a codeunit that populates it onOnAfterPostSalesDocument, and a factbox page showing top 5 items.”
Copilot can scaffold all three if the context is right and your instructions file is complete.
What’s Next
In future posts we’ll go deeper on each of these areas. Subscribe to the RSS feed to stay updated.
Loading comments…