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 :
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,549 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,708 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,549 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,549 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans