🚀 Copilot and AL Development: Transforming the Future of Business Central Engineering

The world of Business Central development is evolving rapidly—and one of the most powerful accelerators in recent years is Copilot. With AI deeply integrated into the Microsoft ecosystem, developers building extensions with AL now have an intelligent partner that speeds up development, enhances accuracy, and improves productivity.

🧠 What Is Copilot in Business Central?

Copilot is Microsoft’s AI-powered assistant designed to help developers, consultants, and end-users across Dynamics 365. For Business Central development, Copilot works in multiple ways:

  • Suggesting AL code in VS Code
  • Generating complete extension structures (tables, pages, APIs, codeunits)
  • Helping analyze and explain existing AL code
  • Creating documentation and comments automatically
  • Supporting AI-enabled scenarios inside BC

It acts like a smart co-developer—always ready, always fast.

💻 Copilot Inside AL Development (VS Code Integration)

To leverage Copilot for AL development, developers use the GitHub Copilot extension in Visual Studio Code. This integration enables:

✔ Instant AL Code Generation

Developers can write a comment or a simple description, and Copilot generates the AL code structure automatically.

Example:

// Create a sales quote scheduler job that sends reminders 

Copilot produces the full codeunit, job logic, and scheduling pattern.

✔ Faster Page & Table Extensions

Copilot instantly creates field additions, actions, triggers, and layouts without manual typing.

✔ API & Permission Set Generation

Perfect for rapid prototyping.

🤖 Using AI Inside AL Extensions

You can integrate AI into your custom extensions using Copilot-enabled system codeunits or external AI services.

Example: A simple AI-driven item description generator:

codeunit 50100 "Item AI Description"
{
    procedure Generate(ItemRec: Record Item): Text
    var
        Copilot: Codeunit "Copilot System";
    begin
        exit(
            Copilot.GenerateText(
                'Create a professional marketing description for item: ' + ItemRec.Description
            )
        );
    end;
} 

This allows users to generate product descriptions instantly saving hours of manual work.

⚡ How Copilot Improves AL Developer Productivity

🟦 1. Rapid Coding

Copilot reduces 60–70% of repetitive development effort.

🟦 2. Fewer Syntax Errors

Copilot understands AL structures and suggests correct patterns.

🟦 3. Code Understanding

It can analyze and explain legacy AL code—very useful during upgrades from NAV to BC.

🟦 4. Documentation

Automatically generates comments and XML documentation.

🟦 5. Code Quality

Copilot suggests modern patterns like interfaces, single-responsibility design, and event-driven architecture.

🚨 Limitations—What Developers Should Know

Despite its strengths, Copilot is not perfect:

  • It may generate outdated syntax or patterns.
  • It cannot validate AL compiler rules.
  • It sometimes repeats code blocks unnecessarily.
  • Developers must always review and refactor generated output.

Copilot is a booster, not a replacement for AL expertise.

Copilot is not just a trend—it’s a game changer for Business Central developers. It speeds up AL development, supports learning, and enhances overall code quality. By embracing Copilot, organizations can deliver extensions faster, reduce development cost, and empower developers to focus on business logic rather than repetitive tasks.

The future of Business Central development is AI-assisted, and Copilot is leading the way.

Stay Tuned for more…

🧩Fixing “Missing appid on table extension metadata” Error in Business Central

Recently while running a tenant synchronization in Microsoft Dynamics 365 Business Central (on-prem), I encountered an error during the Sync-NAVTenant process:

This error typically occurs during tenant synchronization and can halt your deployment or upgrade process. The issue stems from corrupted or incomplete metadata in the app schema snapshot table, specifically related to table extensions.

The error indicates that the $ndo$navappschemasnapshot system table contains table extension records that are missing the required appid field. This can happen due to:

  • Incomplete app installations or uninstallations
  • Failed upgrade processes
  • Database corruption during extension deployment
  • Manual modifications to extensions without proper cleanup.

The Solution

The fix involves cleaning up the corrupted table extension metadata from the schema snapshot table. Here’s the SQL query that resolves the issue:

USE [YourDatabaseName]
GO

DELETE FROM [$ndo$navappschemasnapshot] 
WHERE (istableextension = 1)
GO

4. Start the Service and Sync

Restart the service and perform the tenant sync:

Use Powershell

Start-NAVServerInstance -ServerInstance YourInstanceName
Sync-NAVTenant -ServerInstance YourInstanceName -Mode Sync

The “Missing appid on table extension metadata” error can be frustrating, but it’s usually straightforward to resolve with the SQL cleanup approach. Remember to always backup your database before making direct SQL modifications and test the solution in a non-production environment first.

If you face a similar issue during tenant sync or app upgrade, this SQL cleanup should help you recover quickly.

Protecting Sensitive Data Made Easier: Introducing ‘Concealed’ Text Field Type in Business Central Wave 2 2025

Data privacy and security have become paramount concerns for businesses across all industries. With increasing regulatory requirements and growing awareness of data protection, organizations need robust yet user-friendly solutions to safeguard sensitive information. Microsoft’s Dynamics 365 Business Central Wave 2 2025 introduces a game-changing feature that addresses this challenge: the new ‘Concealed’ text field type with the innovative Mask Type property.

The Challenge: Balancing Security and Usability

Traditionally, we faced a dilemma when handling sensitive data fields. The existing ExtendedDataType = Masked property offered security by displaying field values as dots, but this approach had limitations:

  • Always hidden: Once masked, the data remained permanently concealed, even from authorized users
  • Poor user experience: Users couldn’t verify entered data, leading to potential input errors
  • Limited flexibility: No option to reveal data when legitimate access was needed

These limitations created friction between security requirements and practical usability, forcing developers to choose between protecting sensitive data and maintaining a smooth user experience.

Business Central Wave 2 2025 introduces the new MaskType enum property, revolutionizing how we handle sensitive data display. This property offers two distinct values:

MaskType Values Explained

None (Default)

  • Standard behavior where field values are fully visible in the UI
  • No masking or concealment applied
  • Suitable for non-sensitive data fields

Concealed

  • Field values are hidden by default, appearing as masked dots
  • Users can reveal the actual value through an explicit action
  • An interactive “eye” button appears next to the field for toggling visibility
  • Perfect balance between security and accessibility

Implementing the concealed field type is straightforward. Here’s how to configure it in your AL code:

field(50100; "Sensitive Data"; Text[100])
{
    Caption = 'Sensitive Information';
    MaskType = Concealed;
}

When rendered in the UI, this field will display:

  • Masked dots by default (●●●●●●●●)
  • An eye icon button for revealing/concealing the value
  • Smooth toggle animation between hidden and visible states

Supported Field Types

The MaskType = Concealed property works with:

  • Text fields: For sensitive textual information
  • Code fields: For confidential codes and identifiers
  • Decimal fields: For sensitive numeric values with decimals
  • Integer fields: For confidential whole numbers

Supported Page Types

The concealed functionality is available on:

  • Document pages: Sales orders, purchase orders, etc.
  • Card pages: Customer cards, vendor cards, item cards
  • Not supported: List page repeaters and grid controls

The introduction of the ‘Concealed’ text field type with the MaskType property in Business Central Wave 2 2025 represents a significant advancement in data protection capabilities. This feature successfully bridges the gap between security requirements and user experience, providing organizations with a flexible, user-friendly approach to protecting sensitive information.

Stay tuned for more.

Solving Barcode Printing Issues in RDLC Reports – Business Central On-Premise (v25)

When working with barcode printing in RDLC reports on Microsoft Dynamics 365 Business Central On-Premise, I recently ran into an issue that had me stumped for hours — and as it turns out, it all came down to a subtle but critical font installation step.

If you’re using Business Central and your barcodes refuse to show up in your reports (even after installing the right fonts), read on — this might just be your solution.

🚫 The Problem: Barcode Fonts Not Showing in RDLC

Here’s what I tried — the standard advice you’ll find across most forums:

  • ✅ Installed the barcode font (Code 128, Code 39, Free 3 of 9, etc.) on the service tier machine
  • ✅ Installed the same font on the user/client machine
  • ✅ Restarted the Business Central Server/NST
  • ✅ Restarted the entire machine
  • ✅ Checked that RDLC reports were using the correct font name

Still — no barcodes were rendered.

🕵️ The Hidden Detail: “Install for All Users”

After much trial and error, I stumbled across the real fix:

When installing a font on the Business Central service tier (server), you must choose “Install for all users” — not just a regular install.

Here’s why:

  • Business Central’s NST runs under a system account, not your logged-in user.
  • Fonts installed only for the current user aren’t visible to the NST process.
  • Unless the font is registered system-wide, RDLC won’t be able to use it.

Install the Barcode Font on the Server

  • Right-click the font file (e.g., Code128.ttf)
  • Choose ➡️ Install for all users

Install the Font on Client Machine (Optional but recommended)

  • This ensures previews and printed reports render properly when opened locally.

Restart the Server

  • Not just the NST service — a full restart helps Windows fully register system fonts.

It’s always the little things! A simple checkbox — “Install for all users” — was all it took to fix what seemed like a mysterious RDLC issue.

If you’re working with barcode fonts in RDLC reports on Business Central and nothing seems to work, double-check your font installation method — this could save you hours of frustration.

Hope this will help!!!

Introducing ExcelLayoutMultipleDataSheets in Business Central 2025 Wave 1

With the release of Business Central 2025 Wave 1, business central continues to enhance developer and user experience in reporting and data analysis. One such powerful addition is the new property: ExcelLayoutMultipleDataSheets. This feature addresses a long-standing limitation in Excel export scenarios—allowing multiple datasets to be exported into separate sheets within a single Excel workbook.

What is ExcelLayoutMultipleDataSheets?

The ExcelLayoutMultipleDataSheets property is a new setting introduced for report objects that use Excel layouts. It enables developers to bind multiple data items or datasets to different worksheets in an Excel layout file (.xlsx), making reports more organized and structured when exported.

🧩 Structured Reports
Separate sheets for different datasets make it easier for business users to navigate complex reports—such as Sales Orders on one sheet, Customer Info on another, and Totals on a summary sheet.

🛠️ Developer Control
You can name your data items and match them to sheet names in your Excel layout. This gives you more granular control and reduces the need for workarounds.

How to Use ExcelLayoutMultipleDataSheets

report 50100 MyMultiSheetReport
{
    UsageCategory = ReportsAndAnalysis;
    ApplicationArea = All;
    DefaultRenderingLayout = MyExcelLayout;
    ExcelLayoutMultipleDataSheets = false; // Global setting is to use a single sheet

    dataset
    {
        dataitem(Customer; Customer)
        {
            column(CustomerNo; "No.") { }
            column(CustomerName; Name) { }
        }
        dataitem(Vendor; Vendor)
        {
            column(VendorNo; "No.") { }
            column(VendorName; Name) { }
        }
    }

    rendering
    {
        layout(MyExcelLayout)
        {
            Type = Excel;
            ExcelLayoutMultipleDataSheets = true; // Override for this specific layout
        }
    }
}

In this example, even though the global ExcelLayoutMultipleDataSheets property for the report is set to false, the MyExcelLayout will render the output with two separate worksheets:

  • Data_Customer containing the customer data.
  • Data_Vendor containing the vendor data.

If the ExcelLayoutMultipleDataSheets property within the MyExcelLayout definition was set to false (or not specified), both datasets would be combined into a single “Data” sheet in the Excel output.

The enhancement of the ExcelLayoutMultipleDataSheets property in Business Central Wave 1 2025 offers developers greater flexibility and control over Excel report layouts. By enabling the creation of multi-sheet Excel files at the layout level, you can deliver more user-friendly and better-organized reports, ultimately empowering your users to gain deeper insights from their Business Central data.

Stay tuned for more ….

Optimizing Business Central Reports with the DataAccessIntent Property

When developing reports in Microsoft Dynamics 365 Business Central, performance and scalability are crucial—especially in cloud environments where system efficiency impacts everything from responsiveness to cost. One often-overlooked feature that can significantly enhance report performance is the DataAccessIntent property.

What Is DataAccessIntent?

The DataAccessIntent property is available on report objects in AL. It specifies how a report should access the database—whether it’s read-only or read-write.

The property supports two values:

  • DataAccessIntent = ReadOnly
  • DataAccessIntent = ReadWrite

ReadOnly

When you set DataAccessIntent = ReadOnly, you are explicitly telling the platform that your report only needs to read data from the database and will not perform any write operations.

Why is this important?

  • Better Performance: In Business Central SaaS, reports marked as ReadOnly can run on read-only replicas of the database. This reduces the load on the primary (read-write) database and enhances scalability.
  • Improved Report Execution Time: Since queries are routed to optimized replicas, report rendering can be faster and more efficient.

ReadWrite

If your report needs to modify data during execution—a rare scenario—you should use DataAccessIntent = ReadWrite. This forces the report to run on the primary database.

However, you should avoid using ReadWrite unless absolutely necessary because:

  • It eliminates the benefit of using read replicas.
  • It may degrade performance, especially under high concurrency.

When to Use Each

ScenarioUse ReadOnly?Use ReadWrite?
Standard data listing/reporting
Reports that update records
Diagnostic or audit reports

How to Set DataAccessIntent in AL

report 50100 "Customer Balance Report"
{
    DataAccessIntent = ReadOnly;

    dataset
    {
        dataitem(Customer; Customer)
        {
            column(Name; Name) { }
            column(Balance; "Balance (LCY)") { }
        }
    }

    layout
    {
        // Define RDLC or Word layout
    }
}

By default, if you don’t specify the property, it behaves as ReadWrite. So it’s a good practice to explicitly set it to ReadOnly when applicable.

Important Considerations

  • The DataAccessIntent property is only a hint to the Business Central server. The server may not always be able to use a read-only replica, even if the property is set to ReadOnly.
  • If a report with DataAccessIntent set to ReadOnly attempts to modify data, a runtime error will occur.
  • The DataAccessIntent property can be overridden by the user through the “Database Access Intent List” page in Business Central.

In short: if your report doesn’t write data, use DataAccessIntent = ReadOnly. It’s an easy win for performance and best practice compliance.

Stay tuned for more….

Boosting Performance in Business Central with SETLOADFIELDS

When building customizations or integrations in Microsoft Dynamics 365 Business Central, performance is often a key concern—especially when working with large datasets. One powerful tool for improving performance is the SETLOADFIELDS method on record variables.

🚀 What is SETLOADFIELDS?

In Business Central, when you retrieve a record (using FIND, GET, NEXT, etc.), all fields of the record are loaded from the database by default. This includes fields you might never use, such as FlowFields (which are calculated on the fly). This can lead to unnecessary memory usage and slower data retrieval.

SETLOADFIELDS tells the system which fields to load, so it skips the rest. This can dramatically improve performance, particularly when:

  • You’re looping through large datasets
  • You’re only using a few fields per record
  • Your table includes FlowFields or BLOBs

📘 Syntax

Rec.SETLOADFIELDS(Field1, Field2, ...);

You place this line before reading the records. This tells the AL runtime engine to load only the specified fields when the records are retrieved.

Let’s say you need to loop through all items and check their No. and Inventory:

Item.SETLOADFIELDS("No.", Inventory);
if Item.FINDFIRST then
  repeat
    if Item.Inventory > 0 then
      // do something
  until Item.NEXT = 0;

  1. Use SETLOADFIELDS only when needed – Overusing it without understanding the data flow may result in missing fields or unexpected behavior.
  2. Calling CALCFIELDS still works – You can still explicitly calculate FlowFields after using SETLOADFIELDS.
  3. Resets on modification – If you call MODIFY, INSERT, or VALIDATE, the load fields context is reset. Use SETLOADFIELDS again if necessary.
  4. BLOB and FlowFields – Avoid loading BLOBs and FlowFields unless absolutely necessary. SETLOADFIELDS helps you skip them efficiently.

👨‍💻 Summary

FeatureWithout SETLOADFIELDSWith SETLOADFIELDS
Data LoadedAll fieldsOnly specified fields
Memory UsageHighLower
SpeedSlowerFaster

By leveraging SETLOADFIELDS, developers can significantly optimize the performance of their AL code in Business Central. It’s a small addition that can make a big difference in speed and scalability.

Avoid it when doing full record operations like MODIFY, unless you’re confident about which fields are required.

Stay Tuned for more…

How to Define Allowed Languages Per Environment in Business Central 2025 Wave 1

With the release of Business Central 2025 Wave 1, BC continues to enhance administrative control and governance features. One of the most welcome additions for global organizations is the ability to limit the available language options per environment. This is a game-changer for companies seeking better localization control, user experience consistency, and governance.

🚀 What’s New?

Until now, Business Central environments would display all installed languages by default, allowing users to switch freely. While flexibility is good, it posed problems in certain scenarios:

  • Local subsidiaries wanting only their national language.
  • Confusion due to long lists of unused language options.
  • Incorrect UI labels or translations due to unintended language selection.

Wave 1 2025 introduces the ability to define which languages are allowed per environment. Admins can now limit language choices for users based on the business unit, geography, or internal policy.

🔧 How to Configure Allowed Languages

To define allowed languages for a specific environment, follow these steps:

  1. Sign in to the Business Central
  2. Navigate to the new section: “Allowed Languages”.
  3. From the list of installed languages, check the boxes for only those you wish to allow.

Once applied, users in this environment will only see the allowed languages in their My Settings > Language dropdown.

This new feature may seem minor at first glance, but for global businesses and IT admins, it’s a powerful tool for consistency, control, and compliance. Whether you’re managing multiple countries, brands, or test environments, defining allowed languages per environment helps streamline operations and avoid confusion.

Stay tuned for more..

Understanding GETRANGEMIN() and GETRANGEMAX() in Business Central

When working with filters and record ranges in AL , two handy functions often come into play: GETRANGEMIN() and GETRANGEMAX(). These functions help you programmatically access the lower and upper bounds of a filter applied to a field in a record. This can be especially useful for creating reports, processing data, or passing filters between records.

What are GETRANGEMIN() and GETRANGEMAX()?

These two functions are part of the Record data type and help retrieve the range boundaries for a specific field filter.

  • GETRANGEMIN(Field): Returns the lowest value in the filter range for the specified field.
  • GETRANGEMAX(Field): Returns the highest value in the filter range for the specified field.

If there is no filter set for the field, both functions return blank.

SalesHeader.SETFILTER("No.", '1000..2000');

MinNo := SalesHeader.GETRANGEMIN("No."); // Returns '1000'
MaxNo := SalesHeader.GETRANGEMAX("No."); // Returns '2000'

Use Cases

1. Transferring Filter Ranges

If you’re applying a filter on one table and want to use the same range on another:

Customer.SETFILTER("No.", 'C00010..C00020');
SalesHeader.SETRANGE("Sell-to Customer No.", Customer.GETRANGEMIN("No."), Customer.GETRANGEMAX("No."));

2. Generating Custom Reports

SalesHeader.SETFILTER("Posting Date", '2024-01-01..2024-01-31');

StartDate := SalesHeader.GETRANGEMIN("Posting Date");
EndDate := SalesHeader.GETRANGEMAX("Posting Date");

MESSAGE('Report for: %1 to %2', StartDate, EndDate);

3. Validating Filtered Data

IF (SalesHeader.GETRANGEMIN("Posting Date") < AllowedStartDate) OR
   (SalesHeader.GETRANGEMAX("Posting Date") > AllowedEndDate) THEN
    ERROR('Filter range is outside allowed period.');

The GETRANGEMIN() and GETRANGEMAX() functions are powerful tools when working with dynamic filters in AL. They enable developers to write cleaner, more adaptable code by directly accessing the boundaries of filter conditions.

Stay Tuned for more updates.

Boosting Performance in Business Central with SetAutoCalcFields

In today’s fast-paced business environments, performance optimization is not a luxury — it’s a necessity. Whether you’re building custom reports, extending pages, or writing integration APIs in Microsoft Dynamics 365 Business Central, slow operations can frustrate users and strain resources.

One simple but powerful technique to improve performance is using the SetAutoCalcFields method.

Why FlowFields Matter for Performance

In Business Central, FlowFields are virtual fields calculated on the fly, not stored physically in the database. Examples include:

  • Inventory on Item
  • Balance on Customer

When you retrieve a record, FlowFields are not calculated automatically unless you explicitly call CalcFields().

Manually calculating FlowFields for every record during loops, leading to multiple SQL queries — one for each record — causing heavy load and slower performance.

SetAutoCalcFields solves this by batch-calculating FlowFields along with the record fetch.
Instead of running one query per record, it combines the calculation in a single optimized query.

Imagine fetching 1,000 customers and displaying their balances without SetAutoCalcfields:

CustomerRec.FindSet();
repeat
    CustomerRec.CalcFields(CustomerRec.Balance); // Triggers a DB call every time!
    DisplayBalance(CustomerRec."No.", CustomerRec.Balance);
until CustomerRec.Next() = 0;

Result:
  • 1 SQL query to get Customers
  • + 1,000 SQL queries for Balances

With SetAutoCalcFields:

CustomerRec.SetAutoCalcFields(CustomerRec.Balance);
CustomerRec.FindSet();
repeat
    DisplayBalance(CustomerRec."No.", CustomerRec.Balance);
until CustomerRec.Next() = 0;

Result:
  • 1 SQL query to get Customers and Balances together

Benefits of Using SetAutoCalcFields

  • Improved Page Load Times: By deferring calculations, pages with numerous records and calculated fields will load significantly faster.
  • Faster Report Generation: Reports that rely on calculated fields will be generated more quickly as the calculations are performed only when the field’s value is actually needed for display or processing.
  • Reduced Database Load: Fewer automatic calculations translate to fewer database queries, reducing the overall load on your Business Central database.
  • Enhanced User Experience: Snappier performance leads to a more responsive and enjoyable user experience.

Best Practices for Performance Gains

To maximize the benefits of SetAutoCalcFields:

  • Only specify necessary FlowFields:
    Don’t auto-calculate every FlowField — focus on what your process needs.
  • Use it before data retrieval:
    Call SetAutoCalcFields before FindSet(), FindFirst(), or FindLast()
  • Avoid unnecessary recalculations:
    Once FlowFields are set to auto-calculate, do not manually call CalcFields() again for the same fields.
  • Monitor heavy FlowFields:
    Some FlowFields (e.g., Inventory) involve complex sums across tables — only auto-calculate when really needed.
  • Profile your code:
    Use Performance Profiler to measure improvements.

Using SetAutoCalcFields properly can lead to dramatic performance improvements in Business Central.
By reducing SQL traffic, simplifying code, and batch-fetching FlowFields intelligently, you can create faster, cleaner, and more scalable applications.

A small change in your coding habits can create a big impact for your users.

Hope this will help..