tableextension 5001 "cust Ext" extends Customer { fields { field(9010; "New Date"; Date) { Caption = 'New Date'; DataClassification = ToBeClassified; Editable = true; } } }
page 5001 "test new rec customer2" { ApplicationArea = All; Caption = 'test new rec customer2'; PageType = List; SourceTable = Customer; UsageCategory = Lists; layout { area(content) { repeater(General) { field("No."; Rec."No.") { ApplicationArea = All; ToolTip = 'Specifies the number of the customer. The field is either filled automatically from a defined number series, or you enter the number manually because you have enabled manual number entry in the number-series setup.'; } field("Location Code"; Rec."Location Code") { ApplicationArea = All; ToolTip = 'Specifies from which location sales to this customer will be processed by default.'; } field(Name; Rec.Name) { ApplicationArea = All; ToolTip = 'Specifies the customer''s name.'; } field(Contact; Rec.Contact) { ApplicationArea = All; ToolTip = 'Specifies the name of the person you regularly contact when you do business with this customer.'; } field("Currency Code"; Rec."Currency Code") { ApplicationArea = All; } field("New Date"; "New Date") { ApplicationArea = All; Editable = true; } } } } actions { area(processing) { action("FilterDate") { ApplicationArea = All; Caption = 'Filter Date'; Promoted = true; PromotedCategory = Process; PromotedIsBig = true; trigger OnAction() begin G_RefDate := CalcDate('<-1M>', G_RefDate); Rec.SetRange("New Date", G_RefDate); end; } } } trigger OnOpenPage() begin // Filter Date G_RefDate := DMY2Date(6, 10, 2023); Rec.SetRange("New Date", G_RefDate); // this makes problem end; var G_RefDate: Date; }