Option Webservice filter language

Belias
Member Posts: 2,998
Hi everyone, the title of the thread is just a bunch of keywords i searched without luck.
The problem: we are making a webapp that is using page webservices to expose NAV data.
I have published a page to show the list of sales headers and i told the web guy to filter it based on document type by order or by invoice, depending on what the user clicked on the web app. So far, so good...but.
How do I apply a filter on the option field? If i'm correct, the filter must be a string, thus the criteria to apply should be something like this:
mysalesheader.document_type.Order.ToString()
now the questions:
1. is there a way to change the language of the webservice (globally)?
2. is this the correct way to filter an option value?
3. what if i apply an integer like filter?
Moreover: i created a webservice function to expose the (italian) optioncaption of my option field. I've had to switch the language to italian by doing GLOBALLANGUAGE := 1040 in my function, before "exiting out" the OPTIONCAPTION value. Is there a simpler way to let the web developer know the option captions?
This method works, but after calling it, if you get back to the list of orders i talked about before, the filter on document_type does not work anymore, because Nav tries to apply "Order" filter instead of "Ordine" (italian translation of Order).
The problem: we are making a webapp that is using page webservices to expose NAV data.
I have published a page to show the list of sales headers and i told the web guy to filter it based on document type by order or by invoice, depending on what the user clicked on the web app. So far, so good...but.
How do I apply a filter on the option field? If i'm correct, the filter must be a string, thus the criteria to apply should be something like this:
mysalesheader.document_type.Order.ToString()
now the questions:
1. is there a way to change the language of the webservice (globally)?
2. is this the correct way to filter an option value?
3. what if i apply an integer like filter?
Moreover: i created a webservice function to expose the (italian) optioncaption of my option field. I've had to switch the language to italian by doing GLOBALLANGUAGE := 1040 in my function, before "exiting out" the OPTIONCAPTION value. Is there a simpler way to let the web developer know the option captions?
This method works, but after calling it, if you get back to the list of orders i talked about before, the filter on document_type does not work anymore, because Nav tries to apply "Order" filter instead of "Ordine" (italian translation of Order).
0
Comments
-
If I remember correctly, Vjekoslav Babic has given a presentation on NAVTechDays2012 on Webservices which includes Changing Language in Web Services.
Please have a look at the presentation
http://www.mibuso.com/dlinfo.asp?FileID=14890
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