web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Business Central UI Tip: Show Dash (–) Instead of Zero in List Pages

Khushbu Rajvi. Profile Picture Khushbu Rajvi. 20,947 Super User 2025 Season 2

When customizing List or ListPart pages in Dynamics 365 Business Central, FlowFields can sometimes behave differently than expected—especially when you want to display a dash ("–") instead of a zero. This is a subtle UI detail that enhances readability for end-users, and mimics the behavior seen in standard pages like Job Task Lines Subform.

In this blog, we’ll explore how to reproduce this formatting behavior for custom FlowFields.

In this code, we extended the Item Ledger Entries page to add a calculated field (RKTest) that displays the "Cost Amount (Actual)". We used BlankZero = true and AutoFormatType = 1 to show a dash () when the value is zero. The value is set in the OnAfterGetRecord() trigger, and we blocked drilldown using the OnDrillDown() trigger with a message. This ensures clean formatting and avoids confusion for users when no value is present.

pageextension 50100 "ItemLedgerEntryExt" extends "Item Ledger Entries"
{
    layout
    {
        addbefore("Lot No.")
        {
            field(RKTest; RKTest)
            {
                ApplicationArea = All;
                Editable = false;
                AutoFormatType = 1;
                BlankZero = true;
                Style = Standard;

                trigger OnDrillDown()
                begin
                    Message('No lookup on formula');
                end;
            }
        }
    }

    var
        RKTest: Decimal;

    trigger OnAfterGetRecord()
    begin
        RKTest := Rec."Cost Amount (Actual)" - 0;
    end;
}

O/p:


Thanks For Reading...!!


Regards,

Khushbu Rajvi


This was originally posted here.

Comments

*This post is locked for comments