Add colors to your data, and use less Excel that way!

I find myself copying data into Excel just to be able to easily tag and group data while working on something. But copying Business Central into Excel is a surrender, meaning that there’s something BC can’t do. So let’s try to make it easier to tag data directly in BC. Check out the video:

https://youtu.be/NzR574HMzlc

In this video, Erik tackles a common frustration when working with Business Central: the need to jump into Excel just to color-code journal lines for sorting and grouping purposes. His solution? Add a color-coding field directly to the General Journal using a simple AL extension that leverages Unicode colored square symbols. The result is a lightweight but surprisingly useful tool that keeps you working inside Business Central — and even plays nicely with Analysis Mode for subtotals by color group.

The Problem: Excel as a Color-Coding Crutch

Erik recently found himself doing hands-on end-user work in Business Central — cleaning up auto-generated entries in a General Journal. He quickly fell into a familiar pattern: needing to visually mark groups of lines. The instinctive move? Open the journal in Excel, highlight rows in yellow, red, or other colors, and use those visual markers to group and reason about the data.

After doing this a few times, he realized this workflow was a failure of the tool. You’re supposed to be able to do the work inside Business Central. Constantly switching between BC and Excel — or worse, editing in Excel — is far from optimal. The question became: what if you could color-code lines directly inside Business Central?

The Solution: A Color Enum with Unicode Symbols

The core trick here is beautifully simple. Unicode includes colored square symbols (🟥, 🟦, 🟩, etc.) that render natively in the Business Central client. By creating an enum whose captions are these Unicode symbols, you get a dropdown field that displays as colored blocks — no style sheets, no control add-ins, just plain AL code.

Step 1: Define the Color Enum

First, create an enum that lists the available colors. The first value is intentionally blank (a space character) so that lines can remain untagged. Each subsequent value uses a Unicode colored square as its caption:

enum 50130 Color
{
    value(0; " ")
    {
        Caption = ' ';
    }
    value(1; Red)
    {
        Caption = '🟥';
    }
    value(2; Blue)
    {
        Caption = '🟦';
    }
    value(3; Orange)
    {
        Caption = '🟧';
    }
    value(4; Green)
    {
        Caption = '🟩';
    }
    value(5; Purple)
    {
        Caption = '🟪';
    }
    value(6; Brown)
    {
        Caption = '🟫';
    }
    value(7; Black)
    {
        Caption = '⬛';
    }
    value(8; Unicorn)
    {
        Caption = '🦄';
    }
}

Notice the last value — Unicorn (🦄). Erik added this to make the point that you’re not limited to colored squares. You can use any Unicode symbol that makes sense for your workflow. The field is just an enum; the caption can be whatever helps you visually distinguish groups of lines.

Step 2: Add the Field to the Gen. Journal Line Table

Next, extend the Gen. Journal Line table with a new field that uses the Color enum:

tableextension 50130 "My Color" extends "Gen. Journal Line"
{
    fields
    {
        field(50130; Color; Enum Color)
        {

        }
    }
}

This is a straightforward table extension — no validation logic, no triggers. The field simply stores which color (if any) has been assigned to a journal line.

Step 3: Surface the Field on the General Journal Page

Finally, add the field to the General Journal page, positioned right after the Posting Date column. Setting Width = 1 keeps the column as narrow as possible so it doesn’t eat into valuable screen real estate:

pageextension 50130 "Color" extends "General Journal"
{
    layout
    {
        addafter("Posting Date")
        {
            field(Color; Rec.Color)
            {
                ApplicationArea = all;
                Width = 1;
            }
        }
    }
}

Using It in Practice

With the extension deployed, the General Journal now has a narrow color column right after the posting date. You can click on any line and select a colored square from the dropdown — green for one group, blue for another, purple for something else. It works exactly like color-coding in Excel, but you never have to leave Business Central.

Analysis Mode: Subtotals by Color

Here’s where it gets really powerful. Since the color is a proper field on the table, it integrates with Business Central’s Analysis Mode. You can:

  • Enter Analysis Mode on the General Journal
  • Add the Color field as a row group
  • Get subtotals per color group

This replicates the common Excel workflow of coloring rows, then filtering or summing by color — but entirely within Business Central. The colors don’t carry inherent meaning; they mean whatever you decide they mean for the task at hand. The point is that you can visually tag lines, then analyze them by those tags.

A Note on a Potential Bug

Erik noticed what appears to be a bug in version 26.0: when you assign a color to a line and immediately switch to Analysis Mode, the newly assigned value may not be reflected in the analysis. Business Central saves after every field edit, but Analysis Mode seems to read from a state that doesn’t always include the latest unsaved page data. Going back to the list and re-entering Analysis Mode sometimes shows stale data. Erik flagged this as something that “has to be a bug” — worth being aware of if you’re working on version 26.

Summary

This is a delightfully simple extension — just three AL files plus the app manifest — that solves a real workflow problem:

  1. An enum with Unicode colored symbols as captions
  2. A table extension adding that enum as a field to Gen. Journal Line
  3. A page extension placing the field on the General Journal page

The same pattern can be applied to any list page in Business Central where you find yourself reaching for Excel just to visually tag and group rows. It’s a small amount of AL code that can meaningfully reduce context-switching between BC and Excel during data cleanup and review tasks. And if colored squares aren’t your style — well, there’s always the unicorn. 🦄