Microsoft Dynamics 365 Blog

A few weeks ago I saw an up tick in the number of cases having problems accessing exposed web service. Some of the problem has been because the “CRONUS USA, Inc.” company name converts to an unfamiliar “CROUNS_USA_x002C__Inc”. This will be changing in NAV 2009 SP1, but until that time it would be helpful to know exactly how company names are converted for NAV Web Services. The rules are:

The character ‘%’ are converted to the word “Percent”.

The characters ‘@’, ‘”‘, ‘.’, ‘/’, ‘(‘, ‘)’, ‘\’, ‘-‘, ‘ ‘ (blank space) are converted to “_” with the following two additional rules.

– no two succeeding “_”’s
– no trailing “_” 

This covers most cases and only applies when replacing the above characters, not with the following “special characters”.

Any remaining “special characters” are converted to “a valid XML name” (basically a numeric value, for example, the ampersand ‘&’  are converted to “_x0026_”). When a “special character” is converted like this, you could have two succeeding underscores (‘_’).

List of known special characters (please update as needed.):

  • The ampersand ‘&’  are converted to “_x0026_”
  • The comma ‘,’ is converted to “_x002C_” (i.e. ‘CRONUS USA, Inc.’ would be converted to ‘CRONUS_USA_x002C__Inc’)

Additional, the How-To “Use SystemService to Find Companies” in the NAV 2009 Developer and IT Pro Documentation explain how to call the Companies operation on the SystemService to list the available companies with the converted names.

Scott Wright (scowri)

Microsoft Dynamics North America

Microsoft Customer Service and Support (CSS) North America

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!