Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Odata import error - company name 30 characters long & includes spaces so too long

Posted on by Microsoft Employee

We are using Odata Navision API to import a sales order into MS NAV 2013 R2 and the Odata URL seems to be incorrectly calculating the Web URL below. (I've substituted the company name for privacy)

http://localhost:7068/AAAAA-NAV2013R2-DEV/OData/Company('Aaaaa%20Bbbbbbb%20Cccccccccccc%20Ltd')/ 

The result when hitting NAV is 

 
<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> [^]
<m:code/>
<m:message xml:lang="en-US">
The length of the string is 33, but it must be less than or equal to 30 characters. Value: ='Aaaaa Bbbbbbb Cccccccccccc Ltd'
</m:message>
</m:error>

Taking out the spaces on the test database works but this solution isn't acceptable to the customer.

I have seen reference to hot fix 363433 (You encounter a runtime error when you save changes to an OData set in a company with 30 characters in the company name.) in cumulative update 17 (March 2015) but I can't find any more info on this & don't know if this would solve this problem.

Any help gratefully received.

*This post is locked for comments

  • Suggested answer
    Daniele Rebussi Profile Picture
    Daniele Rebussi 2,480 on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    From the list of cumulative updates in CustomerSource I'm still not able to see it even if it was released 3 days ago.

    Only downloadable from KB link https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb;EN-US;3039826

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    blogs.msdn.com/.../cumulative-update-17-for-microsoft-dynamics-nav-2013-r2-has-been-released.aspx

    The best way is to create a new demo database with same company name and try, and try again after apply the above.

    It is platform hotfix you cannot apply just 363433,

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    Is CU17 already available? I couldn't find it.

    Is it possible to get hold of just the fix 363433 to try that alone instead of applying a whole CU?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    As you mentioned earlier the CU 17 has an platform fix for "You encounter a runtime error when you save changes to an OData set in a company with 30 characters in the company name."

    Please apply that and try.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    Hi,

    The company name as it appears in Navision is in the format "Aaaaa Bbbbbbb Cccccccccccc Ltd" i.e. 30 characters including the spaces.

    If I count the characters in the hyperlink it is 36 characters so it doesn't look like it is counting the characters in the hyperlink i.e. not the %20.

    It seems as though the spaces are being counted as 2 characters which may explain why it thinks the string is 33 characters long instead of 30.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Odata import error - company name 30 characters long & includes spaces so too long

    What is the length of your company name, it should be 30 characters, and it looks like your company name is 33 characters.

    It cannot be more than 30 characters.

    msdn.microsoft.com/.../jj863505%28v=nav.70%29.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans