Hi,
i've created a .Net client to show and update Dynamics Nav data through Web services.
Everything is fine, except for the update of decimal fields.
If i send a decimal number, i.e. 3.56D to the web service, a value of "356.00" is stored.
I'm pretty sure it's a Regional settings/Decimal separator issue, but i cannot find a solution.
I have Windows 7 in english, regional settings in Italian (decimal separator=comma), dynamics nav 2009 english+italian language pack.
Both the client and the server are on the same machine.
I already tried changing the language in Dynamics Nav or in Windows regional options, nothing changes.
How can I know what regional settings the Web service is using? Is there a way to debug the message I send to the server?
I really appreciate any suggestion, as i'm stuck on this.
Thanks
Regards
Marco
0
Comments
What happens if you use English (US) regional settings?
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
Same result:
Value sent: 7.775 (en-US format)
Value stored: 7,775.00 (en-US format)
I changed my regional settings, language in both Classic and Role Tailored Client, restarted both windows services.
I even tried to change the decimal separator of "Network service" account in the registries, setting the "." as decimal separator.
Nothing worked.
If i send the value in a Text field, and in the "OnValidate" method convert it to decimal and set the decimal field, it works. But obviously I cannot do this for each decimal field I have.
Is there a way to debug the Web service instead of the Page? In Dynamics nav source folder i can find only pages/code units etc.. but no web services.
Thanks
I recall working on the NAV 2009 project at MS we did hit various 'regional' issues, where it seemed to us - being a European team - typically US programming not (well) taking into account non-US formatting. But probably that's only a very subjective opinion.
I would suggest to report this one directly to MS through Partner/Customer Source.
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community
I mean, you just need to try to update a Decimal field using Web Services, no special operations.. :-k
Anyway, just to add more information, i created a Java client to connect to the web service and do the same update, and it works perfectly.
It seems a specific .Net issue, tried both VS 2008 (fw 3.5) and VS 2010 (fw 4.0) to be sure, nothing worked..
Downloaded and installed the hotfix:
2/10/2010. KB978939. "Decimals may import incorrectly when importing with WebService on NAV 2009 SP1, if running on local (non-english) OS"
Hope someone will find this helpfully.
Thanks for your support \:D/
So... 8)
Never stop learning
Van Vugt's dynamiXs
Dutch Dynamics Community