Character replacement in Web Services

bbrown
Member Posts: 3,268
I know about using an underscore (_) to replace a space. But what do you do about commas (,) and periods (.)? As an example, the US demo company is "CRONUS USA, Inc.". All the documentation is based on the worldwide database that does not have this issue. I know I could just rename the demo company but I'd like to find the solution in case I see this issue in a client system.
There are no bugs - only undocumented features.
0
Comments
-
First - answering the question first - a comma becomes _x002c_ - meaning that the US company will be
CRONUS_USA_x002c__Inc
Haven't tested it right now - but I am 99% sure.
You can always connect a infopoint to the System Service and get the list of companies from that.
Second - I think I will write a blog post about name mangling in Web Services, URL handling and in properties in WS - stay tuned.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thanks for the reply. That did not work for the comma. (I assume those are zeros)
I sent "CRONUS USA, Inc" as "CRONUS_USA_x002c_Inc". Is that what you meant? I've renamed the company for now so I can keep moving, but I know I run into this again. And in a live company I may not have the option of renaming.There are no bugs - only undocumented features.0 -
You need two underscores after x002c - since the comma is _x002c_ and the following space is _
CRONUS_USA_x002C__Inc
should be correct (just double checked an answer made to another guy for whom it worked).Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
From C# you can use the SystemService to show all companies converted
ws3.UseDefaultCredentials = true;
ws3.Url = "http://10.55.140.122:7047/DynamicsNAV/WS/SystemService"; //Remember
string[] companies = ws3.Companies();
foreach (string company in companies)
{
lstCompanies.Items.Add(company.ToString()); //ListBox
}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