::Jonathon – Here is my developers reply as a sample…
If you have a flowfield and you want the drilldown to show a different set of data you can write code in the ondrilldown trigger.
This example has a flowfield for the sum of the Item quantity, but if you drill down – you’ll get the sales orders. I didn’t do anything but filter on the order, but you can see how it is as an example. This is a basic sample based on what I understand is the ask. It may be done differently with different requirements.
table 50100 “DEV New Table”
{
Caption = ‘New Table’;
DataClassification = CustomerContent;
fields
{
field(1; “Item No.”; Code[20])
{
Caption = ‘Item No.’;
TableRelation = Item;
}
field(15; “Quantitiy”; Decimal)
{
CalcFormula = sum(“Item Ledger Entry”.Quantity where(“Item No.” = field(“Item No.”)));
Caption = ‘Quantity’;
DecimalPlaces = 0 : 5;
Editable = false;
FieldClass = FlowField;
}
}
keys
{
key(PK; “Item No.”)
{
Clustered = true;
}
}
}
page 50100 “DEV New Page”
{
ApplicationArea = Basic, Suite;
Caption = ‘New Page’;
Extensible = false;
PageType = List;
SourceTable = “DEV New Table”;
UsageCategory = Lists;
layout
{
area(Content)
{
repeater(DevControl1)
{
field(Item_No; Rec.”Item No.”)
{
}
field(Quantitiy; Rec.Quantitiy)
{
trigger OnDrillDown()
var
SalesHeader: Record “Sales Header”;
begin
SalesHeader.SetRange(“Document Type”, “Sales Document Type”::Order);
Page.RunModal(Page::”DEV Sales List”, SalesHeader);
end;
}
}
}
}
}
page 50101 “DEV Sales List”
{
ApplicationArea = Basic, Suite;
Caption = ‘Sales List’;
Editable = false;
Extensible = false;
PageType = List;
SourceTable = “Sales Header”;
UsageCategory = None;
layout
{
area(Content)
{
repeater(DevControl1)
{
field(DocumentType; Rec.”Document Type”) { }
field(No_; Rec.”No.”) { }
field(ExternalDocumentNo; Rec.”External Document No.”) { }
}
}
}
}
Thanks,
Steve