field(VendorPostingGroup; VendorPostingGroup)
{
Caption = 'Vendor Posting Group';
ToolTip = 'Select the vendor posting group for the report.';
trigger OnLookup(var Text: Text): Boolean
var
LookupPage: Page "Vendor Posting Groups";
LookupRecord: Record "Vendor Posting Group";
RecRef: RecordRef;
CUSelectionMGT: Codeunit SelectionFilterManagement;
begin
Clear(CUSelectionMGT);
LookupRecord.Reset();
LookupPage.SetTableView(LookupRecord);
LookupPage.LookupMode(true);
if LookupPage.RunModal() = Action::LookupOK then begin
LookupPage.SetSelectionFilter(LookupRecord);
RecRef.GetTable(LookupRecord);
VendorPostingGroup := CUSelectionMGT.GetSelectionFilter(RecRef, 1);
end;
end;
}