SetFilter with an option field

hello all;
i wanna set a filter on an option field.
but this doesn't seem to work, i ve tried

Ecriture.SETFilter("Document Type", Ecriture."Document Type"::Payment) ;

I get an error message.



Please any suggestion
Thank you
Navision

Comments

  • Hi,

    why don't you try:

    Ecriture.SETRANGE("Document Type", Ecriture."Document Type"::Payment) ;

    or

    Ecriture.SETFilter("Document Type",'%1', Ecriture."Document Type"::Payment) ;

    br
    Josef Metz
    br
    Josef Metz
  • it is working now
    Thank you
    :lol:
    Navision