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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to trigger a Trigger OnDrillDown on a Page Field unvisible ?

(0) ShareShare
ReportReport
Posted on by 215

Hello,

Here is my situation. I want to modify the "AutoFormatType" and "AutoFormatExpression" properties of the field "Total Quantity" of the Table 338 "Entry Summary". I know I can't. So my usual workaround is to go into the pages refering to this table field, to put the standard page field to "Visible = false", to create a new field in the page extension refering to the table field, and to add the properties "AutoFormatType/Expression" to my new field.

But...

In this case, there is a But. I'm in the Page 498 Reservation, refereing to the Table 338 "Entry Summary" as SourceTable. There is a field "Total Quantity" in this page. And in this field page, there is a trigger OnDrillDown calling the local procedure DrillDownTotalQuantity.

                field("Total Quantity"; ReservMgt.FormatQty("Total Quantity"))
                {
                    ApplicationArea = Reservation;
                    BlankZero = true;
                    Caption = 'Total Quantity';
                    DecimalPlaces = 0 : 5;
                    Editable = false;
                    ToolTip = 'Specifies the total quantity of the item in inventory.';

                    trigger OnDrillDown()
                    begin
                        DrillDownTotalQuantity;
                    end;
                }
    local procedure DrillDownTotalQuantity()
    var
        Location: Record Location;
        AvailableItemTrackingLines: Page "Avail. - Item Tracking Lines";
    begin
        if HandleItemTracking and ("Entry No." <> 1then begin
            Clear(AvailableItemTrackingLines);
            AvailableItemTrackingLines.SetItemTrackingLine(
                "Table ID", "Source Subtype", ReservEntry, ReservMgt.IsPositive, ReservEntry."Shipment Date");
            AvailableItemTrackingLines.RunModal;
            exit;
        end;

        ReservEntry2 := ReservEntry;
        if not Location.Get(ReservEntry2."Location Code"then
            Clear(Location);

        OnDrillDownTotalQuantity(SourceRecRef, Rec, ReservEntry2, Location, QtyToReserveBase - QtyReservedBase);

        UpdateReservFrom();
    end;

If I try to apply my usual workaround, I'll create a new field that won't be able to call this local procedure with my new field. But I want to. So I'm trying to find a way to trigger the OnDrillDown trigger inside the stadard page field "Total Quantity", even when this field has the property Visible = false.

Do you know workaround possible here ?

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello  - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,033 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,105 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,035 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans