Option, Class and language

galmok
Member Posts: 44
While doing such a simple thing as inserting orders into the sales header/line tables, I was using this syntax to set the Document Type:
SalesHeader.VALIDATE("Document Type",SalesHeader."Document Type"::"Order");
I use this mostly because I don't know the integer value I could use instead but also so I easily can use option values from other tables. But I am wondering what the above line does when I change the language to e.g. Danish. "Order" in Danish is "Ordre".
Will Navision always use the english term ("Order") or be localised? If it is localised, is my only option then to use the integer value? (and what is that value for Order) ;-)
SalesHeader.VALIDATE("Document Type",SalesHeader."Document Type"::"Order");
I use this mostly because I don't know the integer value I could use instead but also so I easily can use option values from other tables. But I am wondering what the above line does when I change the language to e.g. Danish. "Order" in Danish is "Ordre".
Will Navision always use the english term ("Order") or be localised? If it is localised, is my only option then to use the integer value? (and what is that value for Order) ;-)
0
Comments
-
It is always "Order". In the DB is saved the integer value and when you open the editor you see the option value in ENU.
BTW : you should ALWAYS use the option-value in programming and NEVER the integer value. The only thing you may do is to put the option in an integer (e.g. as a parameter for a function) and then use that integer, but if you want to test it, you must use again the option-value.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thank you for the advice. I did use an integer prior to my first request but decided it didn't look good and there had to be a better solution. I wasn't sure the solution I found was the right one, but thanks for confirming it. :-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions