SETFILTER("Customer Name",'ABC*'); FILTERGROUP(6); SETFILTER("Customer Name",'*XYZ*'); FILTERGROUP(0);
recItem.RESET; recItem.FILTERGROUP(6); recItem.SETRANGE("Vendor No.",codVendorNo); recItem.FILTERGROUP(0); IF FORM.RUNMODAL(0,recItem) = ACTION::LOOKUPOK THEN BEGIN ... END;The FILTERGROUP 6 changes the filtergroup in which I put the SETRANGE, then I put the FILTERGROUP back to 0 (the standard one) so the user doesn't see/cannot change my filter on Vendor no.
Comments
You can do:
Filtergroup(6);
setrange(filed,your filter);
Filtergroup(0);
and then if even you expose the filtered field to the user on the request form, both filters, your and typed by the user, apply.
Regards,
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03