Introduction
Dear Readers,
This article marks my first blog post. I am both excited and eager to share my experience of tackling a challenging issue encountered while developing a custom API for Microsoft Business Central to enable data extraction for Power BI reports. I hope this article will be informative and help others avoid the pitfalls I faced.
Context
As part of the Business Central online implementation, I was tasked with enhancing the reporting solution by integrating additional Power BI reports. The process involved the following steps:
- Extract data from Business Central.
- Build Power BI reports.
- Publish reports to the Power BI Service.
Being new to Business Central, my first task was to explore how to connect it with Power BI. After some research, I found that there are two primary methods to expose data from Business Central for use in Power BI reports:
- API Pages or Queries: A method for exposing data through a structured interface.
- Open Data Protocol (OData) Web Services: Allows data to be accessed via a standardized protocol.
Microsoft strongly recommends using REST API web services for integration with Power BI, as highlighted in the following articles:
- Choosing Whether to Use API Pages or OData Web Services
- Compare REST APIs, SOAP, and OData Web Services
Based on this, I decided to use API Pages, as they provide a consistent and reliable interface for integrating with external applications.
To meet specific business needs, I needed to implement custom APIs for the following reasons: Although standard APIs handle common processes and entities such as customers, vendors, and sales orders, they often lack support for custom fields or more complex business logic. Custom APIs, however, provide a flexible integration solution, allowing developers to build APIs that are tailored to meet unique workflows and specialized needs.
Problem Statement
My task was to develop a custom API to extract Business Central data into Power BI. I quickly set up my development environment using Visual Studio Code and the AL Language extension for Microsoft Dynamics 365 Business Central. The necessary downloads can be accessed via the following links:
- Download Visual Studio Code.
- Download the AL Language extension for Microsoft Dynamics 365 Business Central.
Confident that everything was ready, I began developing the API through following steps:
Phase 1: Sign up to Business Central

Phase 2: VS Code new AL project with target platform 13.0
Project contents

File launch.json

File app.json

Phase 3: Download symbols
Downloading symbols is crucial for accessing existing functionality, ensuring proper compilation, and using development tools effectively in Business Central extension development.
I executed the command to download the symbols via Ctrl + Shift + P then AL: Download symbols
Then following error messages occurred:


Despite various attempts to resolve the problem, such as installing the Azure Account extension, clearing the Visual Studio Code cache, and creating new projects with different target platform versions, the issue persisted.
Root Cause Analysis
Upon investigating the root cause, I discovered that the problem lay in the configuration settings of the development environment. Specifically, the environmentName parameter in the launch.json file was incorrectly configured.

The development environment failed to properly connect to Business Central, which prevented the download of the necessary symbols. This issue can be attributed to incorrect URLs or missing settings that blocked the symbol download process.
Solution
Initiating the download symbols process relies on the current configuration in the launch.json file. Therefore, I modified the environmentName parameter in the launch.json file to reference the correct Business Central instance, as demonstrated below:

These details can be obtained from the Business Central session that I initiated during the first phase of the development process. After making that update, I successfully downloaded the symbols, which resolved the error and displayed the following confirmation message:

This allowed me to proceed with the development of the custom API.
Conclusion
Resolving the “Could not download symbols” error in Business Central requires careful configuration of the development environment and proper permission settings. By following the steps outlined above, you can avoid this issue and ensure smooth integration between Business Central and Power BI.
Stay tuned for more insights in my upcoming posts, where I will delve into implementing a custom calendar feature that integrates data from Business Central and enhances logic within Power BI.
Philippe
03.10.2024Great first blog post! I can really relate to the challenges you faced, especially around configuring the development environment for Business Central. Looking forward to your future posts!
Nicolas Abenah
07.10.2024Thanks. Just stay tuned.
In addition, you have a broad expertise shared through dbi services posts.