How-ToAL Development

How to Package Analysis Views in AL Extensions

Learn how to export analysis views from Analysis Mode and deliver them as pre-built tabs in your AL extensions using the new analysisviews construct.

7 min read

Analysis Mode lets users build pivot-style views on list pages without leaving Business Central. These views are personal by default, each user creates their own. Starting with 2026 release wave 1 (version 28.0), developers can export analysis view definitions and package them in AL extensions.

Packaged views appear as locked tabs in Analysis Mode for every user who has the extension installed. Users can copy a packaged view and modify the copy, but the original stays consistent.


How It Works

The process has four steps:

  1. Design and export the analysis view definition from the Business Central client.
  2. Add the exported JSON file to your AL extension project.
  3. Reference the file from a page, pageextension, or pagecustomization object.
  4. Compile and publish the extension.

Export an Analysis View Definition

  1. Open the list or worksheet page where you have an analysis view you want to package.
  2. Enter Analysis Mode using the analyze toggle.
  3. On the analysis view tab, open the tab menu and select Export Definition.

This downloads a JSON file containing the view’s column layout, grouping, filtering, and aggregation settings.

Avoid using data filters on specific values (such as a particular customer number or posting group) in views you plan to package. Those values may not exist in every environment where the extension is installed. Stick to column layout, grouping, and aggregation settings.


Add the View to Your AL Project

Copy the exported JSON file into your AL project. You can organize files in subfolders, for example:

MyExtension/
  src/
    Pages/
      CustomerList.al
  analysisviews/
    CustomerAnalysis.analysis.json

Define Analysis Views on a Page

Use the analysisviews construct inside your page object. Point each view to its exported definition file using the DefinitionFile property.

page 50100 "My Customer List"
{
    PageType = List;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = Customer;

    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field("No."; Rec."No.")
                {
                    ApplicationArea = All;
                }
                field(Name; Rec.Name)
                {
                    ApplicationArea = All;
                }
            }
        }
    }

    analysisviews
    {
        analysisview(CustomerAnalysis)
        {
            Caption = 'Customer Overview';
            Tooltip = 'Pre-built analysis of customer data';
            DefinitionFile = 'analysisviews/CustomerAnalysis.analysis.json';
        }
    }
}

The Caption is what users see on the tab in Analysis Mode. The Tooltip appears when hovering over the tab.


Add Views via Page Extensions

You can add analysis views to existing pages through page extension objects. Use addlast to add new views, or modify to change properties on existing ones.

pageextension 50101 "Sales Order List Ext" extends "Sales Order List"
{
    analysisviews
    {
        addlast
        {
            analysisview(SalesAnalysis)
            {
                Caption = 'Sales Performance';
                DefinitionFile = 'analysisviews/SalesOrderAnalysis.analysis.json';
            }
        }
    }
}

To hide an existing packaged view:

pageextension 50102 "Hide Analysis View" extends "Sales Order List"
{
    analysisviews
    {
        modify(SalesAnalysis)
        {
            Visible = false;
        }
    }
}

Target Specific Roles with Page Customizations

Use page customizations to provide analysis views for specific user profiles. This is useful when different roles need different pre-built views on the same page.

pagecustomization OrderProcessorViews customizes "Sales Order List"
{
    analysisviews
    {
        addlast
        {
            analysisview(OrderProcessorAnalysis)
            {
                Caption = 'Order Processing Overview';
                DefinitionFile = 'analysisviews/OrderProcessor.analysis.json';
            }
        }
    }
}

profileextension OrderProcessorExt extends "ORDER PROCESSOR"
{
    Customizations = OrderProcessorViews;
}

How Packaged Views Behave at Runtime

Packaged analysis views differ from user-created views in several ways:

BehaviorPackaged viewsUser-created views
EditableNo (locked icon on tab)Yes
DeletableNoYes
MoveableNoYes
Consistent across usersYesNo
Survives personalization resetYesNo

Users can create a copy of a packaged view and modify the copy freely. The original packaged view stays locked.

Packaged views can be hidden through the in-client Designer (applies to all users), personalization (current user only), or page customizations (for a specific role).

Users can rename the tab and change its description through the tab menu by choosing Rename.


Handle Table Structure Changes

An analysis view definition references columns from the source table. If a field is removed, renamed, or has its type changed after the view was exported, the affected columns are silently dropped from the view at runtime. The view still loads, but with fewer columns.

Re-export the analysis view definition whenever you change the source table or page layout in ways that affect the columns used in the view.


For more on using Analysis Mode as an end user, see How to Use Analysis Mode in Business Central.

For a broader overview of all new features in this release, see What’s New in Business Central 2026 Release Wave 1.