Dynamics Business Central / NAV Developer Digest - Vol. 556

Dynamics Business Central / NAV Developer Digest - Vol. 556

ArcherPoint by Cherry Bekaert’s Developer Digest focuses on Microsoft Dynamics 365 Business Central and Dynamics NAV development. This week’s volume includes using AL MCP Server with CLI agents, debugging MCP Server, AL practices that affect system performance, and fixing pages that are missing an Action.

The Dynamics 365 Business Central community, consisting of developers, project managers, and consultants, collaborates across various platforms to share valuable insights. At ArcherPoint, we greatly value their dedication and expertise. To ensure widespread access to this technical knowledge, we created Developer Digest.

Using AL MCP Server with CLI agents

The AL MCP Server is a command-line tool packaged within ALTool that exposes core Dynamics 365 Business Central AL development capabilities directly to autonomous AI coding agents and command-line interfaces (CLIs). The server implements the open-standard Model Context Protocol (MCP) and serves as a standardized bridge, enabling your LLM-driven CLI agent to interpret and act on your AL workspace.

It allows agentic tools to build, compile, perform diagnostics, and publish AL extensions without requiring the full Visual Studio Code desktop interface. This can be useful when automating various AI scenarios, such as CI/CD pipelines, chat-based agent workflows, and AppSource validation.

Several blogs that cover the practical application of this feature are worth checking out:

Debugging MCP Server

Speaking of MCP Server…

Troubleshooting Model Context Protocol (MCP) Server is a debugging tool integrated into Visual Studio Code for Business Central. It allows AI coding agents to access live runtime data during an active AL debugging session and:

  • Analyze your call stack
  • Inspect variable values
  • Review relevant source code
  • Help explain why something broke (and maybe even suggest a solution!)

Tonya Bricco-Meske discusses how this tool can help with faster debugging and root cause analysis in her blog, Troubleshooting MCP Server.

When AL slows you down

For the most part, executing AL code has minimal effect on system performance. Unfortunately, this can lead to bad habits that can severely bog down performance or, in some cases, crash the system.

Erik Hougaard covers some of the most problematic AL performance “gotcha’s” and how to avoid them. His short list is worth remembering:

  • Minimize boundary crossings — bulk stream ops, 4-bytes-per-call I/O, TextBuilder accumulation.
  • Turn per-byte computation into table lookups — precompute once, index in the loop.
  • Inline and hoist the proven hot spots, and only those.
  • Cache decoded data instead of re-reading and re-parsing it.
  • Fuse pipeline stages so intermediate data never round-trips through a buffer.

To learn more, read his blog, Writing Fast AL Code: Lessons from a Byte-Crunching Hot Path.

Why is my page missing an Action?

Users who have recently moved to Business Central v28 are missing some actions on their page extensions.

This is not a bug. Instead, this behavior results from pages being migrated to the Modern Action Bar in BC v28, which ignores legacy promotion properties (Promoted and PromotedCategory).

Stefan Šošić explains the problem and how to fix it in his blog, Missing Actions on Pages After Upgrading to Business Central 28 ???.

Are you interested in Dynamics NAV and Business Central development? Check out our collection of NAV/BC Development Blogs.

Read “How To” blogs from ArcherPoint by Cherry Bekaert for practical advice on using Microsoft Dynamics NAV and Dynamics 365 Business Central.

Stay Informed

Choose Your Preferences

"*required" indicates required fields

This field is for validation purposes and should be left unchanged.
Subscription Options
By subscribing you are consenting to receiving emails from ArcherPoint and agreeing to the storing & processing of your personal data as described in our Privacy Policy. You can can unsubscribe at any time.