Hello
I write a function containing a local record variable lrPurchaseHeader associated to the table 38 "Purchase Header" . The field "Document Type" is an Option field
if I write the following I get an error
lrPurchaseHeader.SETFILTER("Document Type", lrPurchaseHeader."Document Type"::Invoice);
"Type conversion is not possible because one of the operators contains an invalid type Text := Option"
If I write the following the compiler does not complain, but I think it's not correct.
lrPurchaseHeader.SETFILTER("Document Type", 'Invoice');
Please clarify me where is my error, thank you in advance.