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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Trigger for Drilldown

(0) ShareShare
ReportReport
Posted on by 55

Hi All,

I'm trying to create a drilldown for my table and page extension that i recently created.

The Table extension is called "Selected Pmts" 

I added this trigger to the Pageextension, but i'm not sure where i went wrong.

Can anyone assist?

pageextension 50103 "Selected Pmts" extends "Bank Account List"
{
layout
{
addafter(BalanceAmt)

field("Selected Pmts"; Rec."Selected Pmts")
            {
                ApplicationArea = all;
                Caption = 'Selected Pmts';
                DrillDown = true;
                 trigger OnDrillDown()
                var
                selpmt: Record "Bank Account"
                begin
                    selpmt."Selected Pmts"(Rec."Selected Pmts");
                    Page.Run(Page:: "Payment Journal");
                end;
                }
                }
                }
                
            

I have the same question (0)
  • Brad_P Profile Picture
    1,551 on at

    Do you have additional information? What are you trying to do specifically? Do you intent to run the payment journal page or a filtered set of records from your table?

  • Rajiv Sewsarran Profile Picture
    55 on at

    Hi Brad,

    i created a Calculated field called "Selected Payments" on the Bank Account List. The field is the sum of all payments made in the Payments Journal for each Entity. The Entity code is represented by Short Dimension Code 1.

    The issue is, when i pull up the bank account list screen, i need to be able to drilldown into the "Selected Payments" to see what makes up that payment.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi coding noob ,

    Please use change your code with below:

    pageextension 50103 "Selected Pmts" extends "Bank Account List"

    {

    layout

    {

    addafter(BalanceAmt)

    field("Selected Pmts"; Rec."Selected Pmts")

               {

                   ApplicationArea = all;

                   Caption = 'Selected Pmts';

                   DrillDown = true;

                    trigger OnDrillDown()

                   var

                   selpmt: Record "Bank Account"

                   begin

                       selpmt."Selected Pmts"(Rec."Selected Pmts");

                       Page.Run(Page:: "Payment Journal",selpmt);

                   end;

                   }

                   }

                   }

  • Rajiv Sewsarran Profile Picture
    55 on at

    Hi Nitin,

    I'm getting the error,

    "Selected pmts cannot be used like a method (Al0127)"

  • Brad_P Profile Picture
    1,551 on at

    What is the CalcFormula properties on the field that you added?

  • Rajiv Sewsarran Profile Picture
    55 on at

    HI Brad,

    Here's the calcformula

    procedure GetProjBal(): Decimal

       begin

           CalcFields(Balance, "Selected Pmts");

           exit(Rec.Balance - Rec."Selected Pmts");

       end;

  • Brad_P Profile Picture
    1,551 on at

    This is not the calcformula property on the field that you had added.

  • Rajiv Sewsarran Profile Picture
    55 on at

    sorry im not sure i follow

  • Rajiv Sewsarran Profile Picture
    55 on at

    Apologies,

    Here it is

               CalcFormula = Sum("Gen. Journal Line".Amount WHERE("Bal. Account No." = FIELD("No.")));

  • Rajiv Sewsarran Profile Picture
    55 on at

    Clcl.PNG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 580 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 480 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans