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; } } }
resolved with above solution
Hi Brad,
This was a great help!
thanks
Hi,
You have to replace this below line with Setrange and please try to put unique name of each field, variable, pages and functions I can see you are using same name everywhere.
selpmt."Selected Pmts"(Rec."Selected Pmts");
Thanks.
I have created a small model which you can follow.
Added a field to the Customer to count the Open Cust. Ledger Entries:
field(50100; "BP Open Entry Count"; Integer)
{
Caption = 'Open Entry Count';
Editable = false;
FieldClass = FlowField;
CalcFormula = count("Cust. Ledger Entry" WHERE("Customer No." = FIELD("No."), Open = Const(true)));
}
On the Customer Card I added the field and a drilldown:
addlast(General)
{
field(BalanceDrillDown; Rec."BP Open Entry Count")
{
ApplicationArea = All;
Caption = 'Drill Down Balance';
DrillDown = true;
trigger OnDrillDown()
var
CustLedgerEntry: Record "Cust. Ledger Entry";
begin
CustLedgerEntry.SetRange("Customer No.", Rec."No.");
CustLedgerEntry.SetRange(Open, true);
Page.RunModal(Page::"Customer Ledger Entries", CustLedgerEntry);
end;
}
}
This should give you enough to go on with your example. I am not clear on your requirements, but you may want to filter the journals a bit more than just a match on No.
If the flowfield source has a page assigned to it, you do not need to specify the page in the parameter and can use 0.
Apologies,
Here it is
CalcFormula = Sum("Gen. Journal Line".Amount WHERE("Bal. Account No." = FIELD("No.")));
sorry im not sure i follow
This is not the calcformula property on the field that you had added.
HI Brad,
Here's the calcformula
procedure GetProjBal(): Decimal
begin
CalcFields(Balance, "Selected Pmts");
exit(Rec.Balance - Rec."Selected Pmts");
end;
What is the CalcFormula properties on the field that you added?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148