How can i set a filter by option field?

i want to set a filter for item ledger entry. entry type field when it is only sale, purchase and transfer.

itemledgerentry.setfilter(“entrytype”,=sale or purchase or transfer)

Did you read SETFILTER help and syntax?

“Item Ledger Entry”.SETFILTER( “Entry Type”,‘Purchase|Sale|Transfer’);

i use this. but it shows all entry type as like positive adjustment,purchase, sales ,transfer.

I am sure you didnt read the help…

Click Help–>C/Side reference guide in your navision

Click search tab in Help file

Type SETFILTER and Enter

Or Open Codeunit 12 and Find SETFILTER

Use

“Item Ledger Entry”.SETFILTER(“Item Ledger Entry”.“Entry Type”,’%1|%2|%3’,
“Item Ledger Entry”.“Entry Type”::Sale,
“Item Ledger Entry”.“Entry Type”::Purchase,
“Item Ledger Entry”.“Entry Type”::Transfer);

thanks, it is working fine.