PurchaseLine.FILTERGROUP(20); PurchaseLine.SETRANGE("Document Type",PurchaseLine."Document Type"::Order); PurchaseLine.SETRANGE("Document No.",PurchaseDocumentHeader."Order No."); PurchaseLine.FILTERGROUP(0); PurchaseLines.LOOKUPMODE(TRUE); PurchaseLines.SETTABLEVIEW(PurchaseLine); IF PurchaseLines.RUNMODAL = ACTION::LookupOK THEN BEGIN PurchaseLines.GetSelectedLines(PurchaseLine); //need to duplicate prev. filters in case of copy all lines with filtergroup error PurchaseLine.SETRANGE("Document Type",PurchaseLine."Document Type"::Order); PurchaseLine.SETRANGE("Document No.",PurchaseDocumentHeader."Order No.");View on page is filtered correctly. When you select some lines and click OK -
Comments
I don't know where to report bugs either, but I can confirm that SETSELECTIONFILTER does not work as it used to, nor as it is documented online.
It copies only filters of some assorted filtergroups. Try filtergroup 3 for instance. That works.
Btw. I did not find a function PurchaseLine.GetSelectedLines. Is it a customization?
Yep, that is custom function to retrieve SETSELECTIONFILTER result.