Filter options

How can include in a SETRANGE only two option property?

CustLedgerEntry.SETRANGE(“Document Type”,CustLedgerEntry.“Document Type”::Refund);
CustLedgerEntry.SETRANGE(“Document Type”,CustLedgerEntry.“Document Type”::Payment);

I have this, but only the first Range is respected
CustLedgerEntry.RESET;
CustLedgerEntry.SETFILTER(CustLedgerEntry.“Customer No.”,Vendor.“Vosso Nº Cliente”);
CustLedgerEntry.SETFILTER(CustLedgerEntry.“Posting Date”,DateFilter);
CustLedgerEntry.SETRANGE(“Document Type”,CustLedgerEntry.“Document Type”::Refund);
CustLedgerEntry.SETRANGE(“Document Type”,CustLedgerEntry.“Document Type”::Payment);

Thanks

Hi, Have you looked at the SETFILTER functionality?

Use

CustLedgerEntry.SETFILTER(“Document Type”,’%1|%2’,CustLedgerEntry.“Document Type”::Refund,CustLedgerEntry.“Document Type”::Payment);