Decimal fields not considering separator via Web Service

lordnedox
Member Posts: 7
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
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
-
Marco,
What happens if you use English (US) regional settings?0 -
lvanvugt wrote:Marco,
What happens if you use English (US) regional settings?
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.0 -
Debugging the Dynamics Nav Page (related to the web service), i can see that the value sent from the client is already in the wrong format, both using Italian or US regional options.
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.
Thanks0 -
Sounds like you definitely did hit a bug.
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.0 -
Sounds weird nobody before noticed this issue.
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..0 -
SOLVED
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/0 -
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