Audit User and Group Permissions Across Apps in Microsoft Dynamics 365 Business Central v28

With Business Central 2026 release wave 1 (v28), Microsoft introduces a powerful new capability — the Permissions Overview page, providing a centralized view of permissions across all apps and extensions.

This feature significantly improves how administrators analyze, audit, and troubleshoot security configurations in complex environments.

In earlier versions, analyzing permissions was fragmented and time-consuming:

  • Permissions spread across multiple apps and extensions
  • No single view to understand who has access to what
  • Difficult to trace Which permission set grants access and Which users or groups are assigned.

What’s New in BC28?

The Permissions Overview page provides a unified and centralized view of all permission sets across:

  • Base application
  • Installed extensions
  • Custom apps

1. Unified View Across All Apps

The Permissions Overview page provides a centralized view of permissions across all apps and extensions, eliminating the need to navigate multiple sources to understand access configurations.


2. Advanced Filtering

Administrators can efficiently filter permissions by object type, scope, extension, or permission set, enabling quick and precise identification of relevant access rights.


3. Trace Access to Specific Objects

The system allows you to easily determine which permission sets grant access to a specific object, providing clear visibility into how permissions are assigned.


4. FactBoxes for User and Group Assignment

Built-in Fact Boxes display the users and security groups associated with each permission set, offering complete transparency into access assignments.

This will help administrator for

1. Improved Security Auditing

The new Permissions Overview enables administrators to perform faster and more accurate security audits by clearly identifying excessive permissions, detecting unused or redundant permission sets, and validating compliance requirements with greater confidence.


2. Simplified Troubleshooting

When users encounter access issues, administrators can quickly search for the relevant object, identify the required permission sets, and verify user or group assignments, significantly reducing the time required to resolve issues.


3. Better Dependency Analysis

In environments with multiple extensions, where overlapping permissions are common, this feature helps identify conflicts, understand permission dependencies, and avoid duplication, leading to a more structured and maintainable security model.

4. Better Governance and Compliance

This feature supports stronger governance by enabling efficient internal audits, simplifying external compliance checks, and ensuring that role-based access is aligned with organizational policies.


5. Improved Role Design

Functional consultants can design cleaner and more effective permission sets by avoiding over-per missioning and aligning access rights closely with business roles and responsibilities.


6. Enhanced User Management

Administrators gain complete visibility into who has access, why they have access, and through which permission sets, resulting in better control and transparency over user permissions.

The Permissions Overview page in Microsoft Dynamics 365 Business Central v28 is a major step forward in security management and transparency.

It transforms permission analysis from a fragmented process into a centralized, efficient, and user-friendly experience.

Turn Off Indexes in Microsoft Dynamics 365 Business Central v28

In version 28 of Microsoft Dynamics 365 Business Central, Microsoft introduced a powerful database optimization feature that allows administrators to disable non-unique indexes with low usage.

This capability provides greater control over database performance, storage usage, and write operations, especially in environments with large datasets and high transaction volumes.

Why Index Optimization Matters

Indexes improve query performance, but every index also introduces maintenance overhead.

Whenever records are inserted, updated, or deleted, the SQL engine must also update all associated indexes.

In high-transaction systems such as inventory, warehouse, and manufacturing operations, unnecessary indexes can lead to:

  • Slower posting performance
  • Increased SQL storage consumption
  • Higher index maintenance cost
  • Longer backup and restore time

By allowing administrators to disable rarely used indexes, Business Central now provides more flexibility to tune database performance.

How to Disable an Index

To disable an index, follow these steps:

  1. Open Table Information in Business Central.
  2. Click on Table No
  3. It will open Table Data Management Card
  4. Clear the Enabled in Database checkbox.

Once disabled, the index is immediately removed from active maintenance, meaning the database engine no longer updates it during data modifications.

Article content

Index Types That Cannot Be Disabled

Article content

These indexes are essential for system functionality and consistency, so they cannot be turned off.

Activation Behavior

Index management behaves differently depending on the operation.

Article content

The delayed activation for enabling indexes prevents heavy index rebuild operations during working hours.

Technical Impact on Performance

1. Faster Write Operations

Each index must be updated when records change.Disabling unused indexes reduces the number of updates required, resulting in faster:


2. Reduced SQL Storage Consumption

Indexes can consume a significant portion of database storage. In large systems with millions of records, removing unnecessary indexes can free several gigabytes of space.


3. Better Performance During High Transactions

Environments with high transaction volumes, such as:

  • Manufacturing
  • Retail
  • E-commerce integrations
  • Warehouse management

can benefit from reduced index overhead during posting.

For example:

When posting thousands of item journal lines, fewer indexes mean less SQL maintenance work.


4. Improved SQL Maintenance Operations

Large numbers of indexes increase the workload for:

  • SQL statistics updates
  • Index rebuilds
  • Database maintenance jobs

By disabling unused indexes, administrators can reduce maintenance windows and resource consumption.

The ability to turn off non-unique indexes per company in Microsoft Dynamics 365 Business Central v28 is a valuable addition for system administrators and technical consultants.

It provides greater flexibility in optimizing database performance, storage usage, and transaction throughput, especially in large Business Central environments.

When used carefully with proper analysis, this feature can significantly improve system efficiency and operational performance.

Add Pictures to Item Variants in Microsoft Dynamics 365 Business Central

In the latest updates of Microsoft Dynamics 365 Business Central, you can now store pictures for Item Variants, making it easier to visually differentiate product options such as color, size, or style.

This enhancement improves usability for sales teams, warehouse staff, and product managers by allowing quick identification of product variations directly from the system.

Why This Feature is Useful

Many companies manage products with multiple variants, for example:

  • T-shirts with different colors
  • Jewelry with different metal types
  • Shoes with different sizes

Previously, variants were identified mainly through codes or descriptions. Now you can attach variant-specific images, making it easier to visually confirm the correct option.

Example:

ItemVariantImage
RingGoldGold ring image
RingSilverSilver ring image

This helps reduce order errors and improves product clarity.

How to Add a Picture to an Item Variant

Follow these steps to attach an image to a variant.

1. Open the Item Card

Navigate to the Item Card of the product.

2. Open Variants

Choose the Variants action to view the list of item variants.

3. Select a Variant

Select the variant you want to update and open the Item Variant Card.

4. Add or Manage the Image

On the Picture FactBox, choose one of the following actions:

Article content

Where This Feature Helps Most

This feature is particularly valuable in industries with visually distinct variants:

  • Retail
  • Fashion
  • Jewelry
  • Manufacturing
  • E-commerce integrations

Warehouse staff can quickly verify the correct variant during picking and packing, reducing mistakes.


Practical Example

Suppose you sell a Bracelet with multiple color options.

Variant CodeDescriptionImage
BR-GLDGold BraceletGold image
BR-SLVSilver BraceletSilver image
BR-BLKBlack BraceletBlack image

By attaching pictures, users can instantly confirm they are selecting the correct variant.


Summary

The Item Variant Picture feature in Microsoft Dynamics 365 Business Central enhances product management by:

  • Allowing images for each variant
  • Improving visual identification
  • Reducing selection errors
  • Enhancing user experience

This is a small but powerful improvement that helps organizations manage complex product catalogs more efficiently.

Top 10 Developer Changes in Business Central v28 (AL / VS Code)

Every major release of Microsoft Dynamics 365 Business Central introduces improvements that impact how developers design, build, and maintain extensions.

Version 28 (2026 Release Wave 1) focuses strongly on performance optimization, platform modernization, and improved developer productivity.

For developers building extensions using AL and Visual Studio Code, several changes require attention during upgrades.

In this article, I will walk through the Top 10 developer changes in Business Central v28 and what they mean for your extensions.

1. Legacy Pricing Engine Removed

One of the biggest platform changes in v28 is the complete removal of the legacy pricing engine.

Microsoft introduced the new Price List architecture in earlier versions, and now it becomes the only supported pricing model.

Developer Impact

Extensions relying on older pricing logic must migrate.

Areas to review include:

  • custom price calculations
  • discount logic
  • pricing-related code units
  • integrations referencing legacy pricing tables

The new pricing system provides a more flexible framework for managing pricing rules and discounts.

2. FlowField Calculation Optimization

Business Central v28 introduces an important optimization for FlowField calculations.

Previously, FlowFields could be calculated even if they were not visible on the page.

In v28, FlowFields are calculated only when the field is visible in the UI.

Benefits

  • fewer SQL queries
  • faster page loading
  • improved scalability for large datasets

3. Improved Search Metadata

Search and navigation are significantly improved in v28.

Developers can now provide better search metadata that improves how users discover pages, actions, and data.

Why this matters

In large Business Central environments with hundreds of pages and reports, improved search helps users locate functionality much faster.

Developers should review:

  • page captions
  • action captions
  • field descriptions

Clear naming improves search results and usability.

4. Resource Files in Extensions

Another useful improvement in v28 is the ability to include resource files within extensions.

These files can store:

  • configuration data
  • templates
  • initialization data

Benefits

Developers can package configuration data directly with the extension instead of writing complex installation code.

This simplifies deployment and improves maintainability.

5. Profile Extension Objects

Customizing user profiles previously required copying base profiles, which created upgrade issues.

Business Central v28 introduces profile extension objects, allowing developers to extend profiles without duplication.

Advantages

  • cleaner customization model
  • easier upgrades
  • better maintainability

Developers can now modify Role Centers and user experiences in a more structured way.

6. Improved Performance Profiling

Performance troubleshooting becomes easier with new profiling improvements.

Developers can capture performance data to analyze:

  • long-running AL procedures
  • page load times
  • inefficient database queries

Why this matters

In large implementations with many extensions, performance bottlenecks can be difficult to detect.

Profiling tools help developers identify inefficient code earlier.

7. SQL Telemetry Insights

Business Central v28 provides better telemetry insights for database operations.

Telemetry data includes:

  • SQL query execution time
  • table interactions
  • query performance statistics

This information integrates with Microsoft Azure Application Insights.

Developer Advantage

Developers can monitor real production workloads and optimize extensions based on actual usage patterns.

8. Sandbox Upgrade Testing Improvements

Upgrade testing is easier in v28.

Developers can now upgrade existing sandbox environments to preview versions.

Benefits

  • test extension compatibility earlier
  • simulate production upgrades
  • reduce upgrade risks

This is particularly important for partners maintaining multiple customer environments.


9. AI Agent Development Scenarios

Microsoft continues to move toward AI-assisted development workflows.

New tools and integrations enable AI agents to assist developers in tasks such as:

  • analyzing AL code
  • generating documentation
  • improving developer productivity

This aligns with Microsoft’s broader AI strategy across the Dynamics ecosystem.


10. Enhanced VS Code Development Experience

The development experience in Visual Studio Code continues to improve.

Enhancements include:

  • better debugging capabilities
  • improved symbol downloads
  • smoother Git integration
  • improved navigation in large AL projects

These improvements help developers manage complex extension projects more efficiently.


What Developers Should Prepare for in v28

Before upgrading to Business Central v28, developers should review their extensions carefully.

Key areas to validate include:

  • pricing logic compatibility
  • FlowField calculations
  • performance-sensitive code
  • search metadata
  • extension initialization processes

Testing extensions in sandbox environments before production upgrades is strongly recommended.

Business Central v28 continues Microsoft’s focus on modernizing the platform and improving developer productivity.

The most significant changes for developers include:

  • removal of legacy pricing logic
  • optimized FlowField calculations
  • improved telemetry and profiling tools
  • better development workflows in Visual Studio Code

Stay tune for more..

How to Create and Use AI Agents in Microsoft Dynamics 365 Business Central

Artificial Intelligence is rapidly expanding inside enterprise systems. With Microsoft Dynamics 365 Business Central v27.4, Microsoft now exposes a first-class agent creation capability — allowing you to define, configure, and run intelligent agents directly inside your ERP environment.

In this blog, we’ll walk through how agents work, the creation experience based on what’s available in the product today.

🚀 What Are AI Agents in Business Central?

In Business Central, AI agents are software assistants that can:

  • Understand natural language instructions
  • Execute business tasks against Business Central data
  • Follow configured rules and permissions
  • Operate autonomously or with human review

These agents sit at a higher abstraction layer than traditional workflows — they interpret intent and then coordinate actions across standard Business Central APIs, pages, and logic.

🛠 Step-by-Step: Creating an Agent in Business Central

Here’s a distilled implementation walk-through based on the video and documentation:

1. Enable Agent Capabilities

Before you can create agents, you must:

  • Enable Custom Agent capability in your Business Central environment
  • Have a sandbox tenant for experimentation
  • Ensure you have relevant permission sets such as AGENT-ADMIN and AGENT-DIAGNOSTICS applied to your user account

2. Start the Agent Wizard

Once enabled:

  1. Click the “Agent” icon in the role centre
  2. Choose Create New Agent
  3. Select a template (e.g., Sales Validation) or start from scratch
  4. Provide:

The installer guides you through setting up:

  • Purpose
  • Profile
  • Permissions

Agents are treated like users, so they must have clear permissions defining what Business Central data they can access and act on.

3. Define Agent Instructions

This is the heart of the agent. Instructions are plain-language “task definitions” that guide what the agent should do when triggered.

A basic instruction structure looks like:

  • Introductory purpose
  • Step-by-step tasks
  • Expected output or result

Example :

“You are a Business Central agent. When invoked, check all overdue receivables and create a work list of customers where the balance exceeds credit terms.”

Agents use this instruction to orchestrate actions, call APIs, or run logic — all while respecting security.

4. Configure Execution Profile

Each agent runs under a specific profile:

  • Choose standard or custom roles used in Business Central
  • Profiles determine UI access and actions available to the agent
  • Permissions are tied to the profile

Profiles limit what the agent can read or write — essential for governance.

5. Test and Activate

Once configured:

  1. Use the Agent Task Playground to simulate tasks
  2. Review output and refine instructions
  3. When ready, activate the agent
  4. The agent can run immediately or wait for a trigger

In preview today, scheduling and automated triggers are limited — most agents are started manually or via designated events.

📍 Real Business Examples

Agents being highlighted in Business Central include:

🔹 Sales Order Agent

  • Monitors a designated email inbox
  • Parses incoming customer requests
  • Locates or creates the customer record
  • Verifies item availability
  • Generates and sends quotes or orders via email
  • Keeps the human reviewer in the loop for approvals and changes

This helps sales teams minimize manual order entry by automating standard order processing tasks.


🔹 Payables & AP Agents

Similar to sales agents, agents can automate Accounts Payable workflows by:

  • Monitoring invoice email inboxes
  • Extracting invoice data using AI
  • Drafting vendor invoices inside Business Central
  • Letting users review and finalize postings

This frees AP teams from repetitive data entry and improves efficiency.

AI agents in Microsoft Dynamics 365 Business Central are more than an experiment — they’re a new paradigm for embedding intelligence inside operational ERP processes. Rather than writing bespoke automation, you define business intent, and the system interprets and operationalizes it — provided you set the rules, permissions, and expectations correctly.

From Experimentation to Enterprise Architecture: Reflections from AgentCon Bangkok 2026

I recently attended AgentCon Bangkok 2026, and one theme was unmistakable: AI agents are transitioning from experimental prototypes to enterprise-grade systems.

The narrative has shifted.

It is no longer about building impressive demos. It is about designing structured, governed, production-ready agent architectures that can operate inside real business systems.

1. The Evolution of AI Agents

In earlier stages, most AI implementations focused on:

  • Prompt engineering
  • Single-agent task execution
  • Standalone copilots

At AgentCon, the conversation was centered on:

Multi-Agent Architectures

Planner–Executor–Validator models are becoming standard design patterns. Instead of a single LLM handling everything, responsibilities are separated:

  • Planner agent defines tasks
  • Executor agent performs tool calls or API interactions
  • Validator agent enforces constraints and accuracy

This improves determinism, auditability, and risk control.

2. Tool-Calling Is the Real Differentiator

What makes agents enterprise-ready is not the language model itself — it is structured tool integration.

In ERP ecosystems like Microsoft Dynamics 365 Business Central, value emerges when agents:

  • Call APIs securely
  • Read structured financial data
  • Trigger workflows
  • Generate reports with contextual awareness

The LLM becomes a reasoning layer, while the ERP remains the system of record.

This separation is critical.

3. Practical Enterprise Applications

Beyond experimentation, AI agents are beginning to demonstrate measurable operational value across industries:

Configuration & Compliance Audits

Agents that scan enterprise configurations, policy settings, and control structures — identifying inconsistencies and generating structured compliance reports.

Automated Documentation & Knowledge Systems

Agents that analyze system metadata, logs, or workflows to generate accurate, up-to-date documentation and operational guides.

AI-Assisted Development & Code Review

Agents embedded into IDEs to:

  • Review code quality
  • Validate security standards
  • Detect performance bottlenecks
  • Enforce architectural guidelines

Intelligent Workflow Orchestration

Agents embedded within operational processes to:

  • Provide contextual recommendations
  • Validate transactions before execution
  • Surface risk indicators in real time
  • Assist decision-makers without bypassing control layers

The emphasis is augmentation — not blind automation.

4. The Real Question

The future is not about replacing users.

It is about designing human-in-the-loop systems where:

  • Agents reason
  • Humans approve
  • Systems enforce

The architectural discipline behind these systems will determine whether AI becomes operational infrastructure — or remains a demo tool.

Final Thoughts

AgentCon reinforced a clear conclusion:

AI capability is accelerating. Enterprise readiness depends on architecture.

Organizations that invest in governance models, tool integration frameworks, and structured orchestration will lead the next phase of AI adoption.

If you are building production-grade agent systems inside enterprise environments, this is the moment to think beyond prompts — and design for scale.

🚀 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…

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!!!

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…