This is code:
action("Open Enquiries Filter Page")
{
Caption = 'Open Enquiries Filter Page';
ApplicationArea = All;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
trigger OnAction()
var
varFilterPageBuilder: FilterPageBuilder;
Enquiries: Record Enquiries;
FilterExpr: text;
recEnquiries: Record Enquiries;
Past3Months: Date;
varDefaultView: Text;
varDateItem: Text[30];
cdu_FilterTokens: Codeunit "Filter Tokens";
begin
Enquiries.Reset();
varFilterPageBuilder.AddTable('Enquiries', Database::Enquiries);
varFilterPageBuilder.AddField('Enquiries', Rec.No);
varFilterPageBuilder.AddField('Enquiries', Rec.Status);
varFilterPageBuilder.AddField('Enquiries', Rec.Email);
varFilterPageBuilder.AddField('Enquiries', Rec.Contact);
varFilterPageBuilder.AddField('Enquiries', recEnquiries.DateCreated);
varFilterPageBuilder.AddField('Enquiries', recEnquiries.DateCreated);
varFilterPageBuilder.PageCaption := 'Enquiries Filter Page';
if varFilterPageBuilder.RunModal() then begin
Enquiries.SetFilter(DateCreated, DateCreate);
Enquiries.SetFilter(DateCreatedTo, DateCreateTo);
if Enquiries.FindSet() then begin
Enquiries.SetView(varFilterPageBuilder.GetView('Enquiries'));
CurrPage.SetTableView(Enquiries);
end;
end;
end;
}
}
}
var
DateCreate: Text;
DateCreateTo: Text;
}