changing languages

dyn45dyn45 Member Posts: 67
edited 2007-02-01 in Navision Attain
Hi there,
I placed this two lines in OnOpenForm

SETFILTER("Entry Type", 'Sale');
FIND('-');

and this is working fine.
but, when I change language in navision an error occured:
'Sale' is not an option.
The existing options are:
blah, blah, blah.

I know why it happens, but i do not know how to fix it. Please help

Answers

  • kinekine Member Posts: 12,562
    yes, you need to learn how to use Option fields correctly :-). Read some manual. Shortly:
    SETFILTER("Entry Type", "Entry Type"::Sale); 
    
    8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dyn45dyn45 Member Posts: 67
    SETFILTER("Entry Type", "Entry Type"::Sale);

    I tried that at first place, won't work...

    Type conversion is not possible because 1 of the operators contains an invalid type.
    Text := Option
  • kinekine Member Posts: 12,562
    Ah sorry, my mistake. I overlooked that you are using SETFILTER and I copied it. It must be
    SETRANGE("Entry Type", "Entry Type"::Sale); 
    
    or
    
    SETFILTER("Entry Type", '%1',"Entry Type"::Sale); 
    
    

    What's the difference etc. you can find in many threads around this forum when you will search for SETFILTER and SETRANGE.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dyn45dyn45 Member Posts: 67
    Thanx a lot...
    I am new in nav, so you'll understand...
  • kinekine Member Posts: 12,562
    Everyone needs to start somehow... 8)

    I recommend you to use the w1w1adg.pdf from product install cd DOC folder as first aid source. :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.