Base App vs System App

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 10 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Understanding the Architecture of Microsoft Dynamics 365 Business Central – Base App vs. System App

Introduction: The Foundation of Business Central Development

When you first begin working with Microsoft Dynamics 365 Business Central (BC), it is easy to view the platform as a single, monolithic piece of software. In reality, the environment is a modular ecosystem built upon layers of functionality. Understanding these layers is not just a technical exercise; it is fundamental to how you design, deploy, and maintain custom solutions. The two most critical pillars of this architecture are the System App and the Base App.

If you are a developer or a technical consultant, your ability to build stable extensions depends entirely on your grasp of these two components. The System App provides the underlying "plumbing" that allows the platform to function—handling things like database connectivity, user sessions, and low-level system events. The Base App, on the other hand, contains the business logic that defines what Business Central actually does as an ERP system—managing general ledgers, sales orders, inventory, and customer relationships.

In this lesson, we will peel back the layers of the Business Central application stack. We will explore why these two apps are separated, how they interact, and why following the rules of dependency management is the difference between a project that runs smoothly for years and one that breaks every time Microsoft releases an update. By the end of this guide, you will be able to distinguish between the two, understand how to extend them safely, and recognize the architectural boundaries that define modern BC development.


Not read yet

Defining the System App: The Engine Room

The System App is the foundational layer of the Business Central platform. Think of it as the operating system for your business logic. It provides a set of highly optimized, platform-level services that are exposed to both the Base App and your custom extensions through AL (the Application Language).

Purpose and Scope

The primary goal of the System App is to encapsulate platform functionality in a way that is versioned and isolated. Because the System App is maintained by Microsoft, its primary function is to provide stable interfaces (APIs) that do not change frequently, even when the underlying platform logic undergoes significant refactoring.

The System App includes modules that are essential for any application to run, such as:

  • Authentication and Authorization: Handling user permissions and security roles.
  • Communication and Integration: Managing email, file handling, and web service connectivity.
  • Data Management: Providing tools for data exchange, compression, and system-wide settings.
  • Environment Information: Allowing code to detect whether it is running in a sandbox, production, or cloud environment.

Why the Separation Matters

Before the transition to the AL-based extension model, much of this functionality was buried deep within the platform, inaccessible to developers. By moving these functions into a dedicated System App, Microsoft has created a contract-based development environment. You do not modify the System App; you consume its services. This prevents "code pollution" where developers might accidentally alter core system behaviors that would negatively impact the entire tenant.

Callout: The "Black Box" Concept Think of the System App as a "black box" utility belt. You don't need to know how the "Send Email" function is implemented in the background; you only need to know the interface (the signature) to trigger it. This abstraction allows Microsoft to update the internal implementation of the email service (e.g., changing from an old SMTP protocol to a modern Graph API) without breaking your code, provided the function signature remains constant.


Not read yet

Defining the Base App: The Business Logic Core

If the System App is the engine room, the Base App is the factory floor. It contains the thousands of objects—tables, pages, reports, and codeunits—that make up the actual ERP functionality. When you log into Business Central and create a sales invoice, post a general journal, or look at an item card, you are interacting with the Base App.

Structure and Content

The Base App is essentially a massive collection of industry-standard business processes. It represents the "standard" way of doing business that Microsoft has refined over decades of ERP development. Key areas include:

  • Financial Management: General Ledger, VAT/Tax calculation, and Bank Reconciliation.
  • Supply Chain Management: Inventory tracking, warehouse management, and assembly orders.
  • Sales and Purchasing: Customer and vendor management, quote-to-cash workflows, and procurement.
  • Project and Resource Management: Job tracking and service management.

The Role of Customization

In the past, partners would "customize" the Base App directly, modifying the source code to fit a client's specific needs. Today, that is strictly prohibited in the modern extension model. Instead, we use the Base App as a dependency. Your custom extensions "depend" on the Base App, meaning they can read its data, hook into its events, and extend its pages, but they cannot change the original source code. This ensures that when Microsoft updates the Base App, your customizations remain intact and operational.


Not read yet

Comparing the Two: A Quick Reference

To help you distinguish between these two layers, refer to the table below. Understanding these differences will prevent you from attempting to modify the wrong layer of the application.

Feature System App Base App
Primary Focus Platform services and plumbing Business logic and ERP processes
Modification Never modified; only consumed Never modified; only extended
Accessibility Accessible by all apps Accessible by dependent apps
Evolution Stable, API-driven interfaces Subject to frequent business logic updates
Developer Interaction Calling functions/modules Subscribing to events/extending objects

Technical Implementation: Dependencies and Usage

In Business Central development, dependencies are defined in the app.json file of your extension. Understanding how to declare these dependencies is vital for a clean build.

Defining Dependencies in app.json

When you create a new project in VS Code, your app.json file will automatically include the System App and the Base App as dependencies. This allows your AL code to "see" the objects within those apps.

{
  "name": "MyCustomExtension",
  "publisher": "MyCompany",
  "version": "1.0.0.0",
  "dependencies": [
    {
      "id": "63ca2fa4-4f03-4f2b-a480-172f56407001",
      "publisher": "Microsoft",
      "name": "System App",
      "version": "23.0.0.0"
    },
    {
      "id": "437dbf0e-84ff-417a-965d-ed2bb9650972",
      "publisher": "Microsoft",
      "name": "Base Application",
      "version": "23.0.0.0"
    }
  ]
}

Note: The id fields are the unique identifiers (GUIDs) for the System and Base Apps. These are constant, but the version numbers will change as Microsoft releases updates. Always ensure your local environment matches the versions defined in your project settings to avoid "circular dependency" or "missing symbol" errors.

Using System App Modules

The System App is organized into modules. To use a module, you use the using keyword in your AL code. For example, if you want to use the "Environment Information" module to check if your code is running in a sandbox, you would do the following:

codeunit 50100 MySystemCheck
{
    using Microsoft.System.Environment;

    procedure CheckIfSandbox()
    {
        if EnvironmentInformation.IsSandbox() then
            Message('You are in a sandbox environment.');
    }
}

This approach keeps your code clean and allows you to leverage Microsoft-tested, secure functionality rather than writing your own wrappers for system tasks.


Not read yet

Best Practices for Development

Working with the Base App and System App requires a disciplined mindset. Because you are building on top of a living, breathing application, your practices must prioritize future-proofing.

1. Prefer Events over Code Modification

The most important rule in Business Central development is: Never try to change the existing logic if you can hook into an event instead. The Base App is filled with "Integration" and "Business" events. When you want to add a field to a page or perform an action after a record is inserted, look for an OnAfterInsert or OnBeforePost event.

2. Isolate Your Logic

Do not write all your code inside the objects provided by the Base App. Create your own codeunits to handle your business logic. If you find yourself writing a 500-line function inside a TableExtension, you are doing it wrong. Move that logic into a separate codeunit and call it from the event subscriber. This makes your code testable and easier to debug.

3. Respect the Dependency Chain

If you are building a solution that has multiple extensions, keep the dependency chain linear. If App A depends on the Base App, and App B depends on App A, keep that hierarchy clear. Avoid circular dependencies where App A depends on App B and App B depends on App A; this will cause the deployment to fail and lead to significant performance issues.

Warning: The "Hidden Object" Trap Avoid relying on internal objects or variables in the Base App that are not marked as public. If an object is marked as internal or protected, it is not intended for your use. Microsoft may change or remove these objects in future releases, which will cause your extension to break instantly. Always use the public APIs provided.


Not read yet

Common Pitfalls and How to Avoid Them

Even experienced developers fall into traps when dealing with the Base/System app architecture. Here are the most frequent mistakes and how to avoid them.

Pitfall 1: Hard-Coding IDs

New developers often see an object ID (like a table ID) and hard-code that number into their logic. While this works in the short term, it is fragile. If the underlying structure of the Base App changes, your hard-coded reference might point to the wrong object or a deprecated feature. Always use the object name or a variable reference where possible.

Pitfall 2: Ignoring Version Compatibility

When Microsoft pushes a major update to Business Central, the Base App and System App change. If your extension is locked to an older version of these apps, it will not be compatible with the new environment. Always maintain your app.json file and test your code against the latest versions in a sandbox environment before deploying to production.

Pitfall 3: Re-inventing the Wheel

Before writing a complex function to handle something like file compression or encryption, check the System App modules. Many developers write custom code for tasks that are already natively supported by the System App. Using the native modules is safer, more performant, and automatically updated by Microsoft.


Not read yet

Detailed Example: Extending the Base App

Let’s look at a practical scenario. Suppose you need to add a "Customer Loyalty Level" field to the Customer card and ensure that whenever a customer is modified, a log entry is created.

Step 1: Create a Table Extension

First, we extend the base Customer table to hold our new data.

tableextension 50101 MyCustomerExt extends Customer
{
    fields
    {
        field(50100; "Loyalty Level"; Option)
        {
            OptionMembers = Bronze, Silver, Gold;
        }
    }
}

Step 2: Create a Page Extension

Next, we add the field to the Customer Card page so the user can see it.

pageextension 50101 MyCustomerCardExt extends "Customer Card"
{
    layout
    {
        addafter(Name)
        {
            field("Loyalty Level"; Rec."Loyalty Level")
            {
                ApplicationArea = All;
            }
        }
    }
}

Step 3: Implement Logic via Event Subscriber

Instead of trying to modify the standard OnModify code in the Customer table, we create a separate codeunit to listen for the change.

codeunit 50102 CustomerEventHandler
{
    [EventSubscriber(ObjectType::Table, Database::Customer, 'OnAfterModifyEvent', '', false, false)]
    local procedure LogCustomerChange(var Rec: Record Customer; var xRec: Record Customer)
    begin
        // We use a custom log table here
        Message('Customer %1 has been updated.', Rec.Name);
    end;
}

By following this three-step process, you have successfully extended the Base App without modifying a single line of standard Microsoft code. This is the gold standard for BC development.


Not read yet

Advanced Considerations: The Role of "Hidden" Apps

In a modern Business Central environment, you might see more than just the Base and System apps. You might see apps labeled "Microsoft_Application" or "Microsoft_System." These are the modularized components of the former monolith.

It is important to realize that the "Base App" is itself an extension of the "System App." This means the Base App is just another "customer" of the System App. If you ever feel like you need more power than the Base App provides, check the System App documentation. You will often find that the functionality you need is available at the platform level, which is even more stable and performant than the business logic layer.

Maintaining Performance

Because everything in the extension model is an app, every dependency you add creates a slight overhead. While this is negligible for most projects, if you are building an extremely high-transaction system, be mindful of how many dependencies you load. Only include the apps you absolutely need. If you are not using any warehouse functionality, do not force your app to depend on the full Warehouse module of the Base App.


Not read yet

Key Takeaways

To summarize the architectural relationship between the System App and the Base App, keep these points in mind:

  1. Separation of Concerns: The System App handles the "how" (platform, connectivity, security), while the Base App handles the "what" (invoicing, inventory, finance).
  2. The Extension Model: You never modify the source code of these apps. You extend them using TableExtensions, PageExtensions, and EventSubscribers. This is the only way to ensure your code survives platform updates.
  3. Dependency Management: Your app.json file is the contract between your code and the platform. Keep dependencies clean and ensure you are targeting the correct versions to avoid build errors.
  4. Use Native Modules: Before writing custom logic for system-level tasks, always check if the System App has a native module that performs the function. It is almost always more secure and reliable.
  5. Event-Driven Architecture: Embrace the event-driven nature of Business Central. If you find yourself wanting to "change" code, rethink your approach to "subscribing" to code.
  6. Avoid Hard-Coding: Use object names and standard references instead of hard-coded IDs. This protects your code from being broken by future Microsoft updates.
  7. Test in Sandboxes: Always validate your dependencies and extensions in a sandbox environment before deploying to production. The Base App updates frequently, and your code must be tested against these changes.

By mastering the distinction between the System App and the Base App, you transition from being a developer who "hacks" an ERP to an architect who builds scalable, maintainable, and professional solutions on the Business Central platform. This architectural knowledge is your greatest asset in ensuring long-term success for your business applications.


Not read yet

Frequently Asked Questions (FAQ)

Q: Can I modify the System App if I really need to? A: No. The System App is provided by Microsoft and is locked. If you find a bug in the System App, you should report it to Microsoft via the standard support channels rather than attempting to circumvent it.

Q: Why does my project fail to compile after a Business Central update? A: This usually happens because the version of the Base App or System App defined in your app.json is outdated. Update the version numbers in your app.json file to match the new environment and re-download your symbols.

Q: What is the difference between an Integration Event and a Business Event? A: An Integration Event is usually a technical hook (like "After a record is inserted"). A Business Event is a functional hook (like "After a Sales Order is released"). Both are used to extend functionality without modifying core code.

Q: Should I put all my code in one large extension? A: No. It is best practice to keep your extensions modular. If you have a set of features related to "Shipping" and another for "Reporting," consider splitting them into two separate extensions. This makes maintenance and testing much easier.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.