RE: Can't reference custom page
table 50100 Payments
{
DataClassification = ToBeClassified;
fields
{
field(1; "Posting Date"; Date)
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."Posting Date";
Caption = 'Posting Date;';
}
field(2; "Batch Name,"; Code[20])
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."Journal Batch Name";
Caption = 'Batch Name';
}
field(3; "Vendor ID"; Text[200])
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."vendor ID";
Caption = 'Vendor ID';
}
field(4; "Vendor Name"; Text[200])
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line".Description;
Caption = 'Vendor Name';
}
field(5; Amount; Decimal)
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."Amount (LCY)";
Caption = 'Amount';
}
field(6; "Entity Code"; Code[20])
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."Shortcut Dimension 1 Code";
Caption = 'Entity Code';
}
field(7; "Account Number"; text[100])
{
DataClassification = ToBeClassified;
TableRelation = "Gen. Journal Line"."Bal. Account No.";
Caption = 'Account Number';
}
}
page 50101 Payments
{
PageType = List;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Gen. Journal Line";
layout
{
area(content)
{
repeater(General)
{
field("Batch Name "; Rec."Journal Batch Name")
{
ToolTip = 'Specifies the Batch the Payment is assigned to.';
ApplicationArea = All;
}
field("Posting Date"; Rec."Posting Date")
{
ToolTip = 'Specifies the date the payment was/will be posted.';
ApplicationArea = All;
}
field("Vendor ID"; Rec."Vendor Id")
{
ToolTip = 'Specifies the Vendor ID to whcih the payment was applied.';
ApplicationArea = All;
VIsible = false;
}
field("Vendor Name"; Rec.Description)
{
ToolTip = 'Specifies the name of the Vendor to which the payment was applied.';
ApplicationArea = All;
}
field("Amount"; Rec.Amount)
{
ToolTip = 'Specifies the Amount that was paid.';
ApplicationArea = All;
}
field("Entity Code"; Rec."Shortcut Dimension 1 Code")
{
ToolTip = 'Specifies the Entity.';
ApplicationArea = All;
}
field("Account No."; Rec."Bal. Account No.")
{
ToolTip = 'Specifies the Account Number.';
ApplicationArea = All;
}
The above is the Table and Page that I created
Below is the trigger that i'm trying to use to drill down into the newly created page
field("Escrow Payments"; Rec."Escrow Payments ")
{
ApplicationArea = all;
Caption = 'Escrow Payments';
DrillDown = true;
trigger OnDrillDown()
var
selpmt: Record "Bank Account";
begin
selpmt.SetRange("Escrow Payments");
selpmt.get(Rec."No.");
Page.RunModal(Page::"Payment Journal");
end;
The drill down works fine if i go to the payment journal, but i need it to go to the newly created page. When i replace "Payments Journal" with "Payment" i get the error mentioned in the first post.
If this cant work is there a way i can filter the Escrow Payments - so when i drill down into that, i can see the payments that are assigned to that particular bank account, rather that at a batch level?