Option Webservice filter language

BeliasBelias Member Posts: 2,998
edited 2013-04-04 in NAV Three Tier
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).
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog

Comments

Sign In or Register to comment.