Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

OData Properties have spaces

(0) ShareShare
ReportReport
Posted on by 15

We recently upgraded to version 10.0.1265.20 in a cloud hosted environment.

We also use Microsoft's OData Connected extension in Visual Studio to generate C# client code.

After the upgrade, we started getting errors in several OData navigation properties.  The navigation properties now have spaces, which causes the C# code to not compile.

So far we found issues with the following names:

Assigned group
Assigned position
Assigned tasks
Assigned template tasks
Business calendar
Business process templates
Onboard tasks
Template tasks

Has anyone seen this problem?  Does anyone know if there is a fix?

Thanks in advance

  • Suggested answer
    Andreas Hassing Profile Picture
    on at
    RE: OData Properties have spaces

    Indeed, this seems to have been a bug in Dynamics. It was recently fixed for 10.0.32 and backported to 10.0.31 and 10.0.30.

    To find the backport fix search in LCS for issue #: 753226.

  • MikeTherien Profile Picture
    15 on at
    RE: OData Properties have spaces

    I tried opening a support ticket with Microsoft.  After going back and forth with support for several weeks, they finally said that this isn't their problem.

    As a workaround, we have downloaded the EDMX document, manually removed the spaces, then generated the client.

  • DSAnderson Profile Picture
    15 on at
    RE: OData Properties have spaces

    For reference, I installed 10.0.29 on a development server today to see if MS had corrected any of the space issues.  Unfortunately, it appears that they have gone the other direction with atleast 5 new navigation properties that contain spaces.

  • pmke Profile Picture
    10 on at
    RE: OData Properties have spaces

    OData Connected Service and OData-CLI are in the same repository on GitHub: https://github.com/OData/ODataConnectedService.  I haven't looked at the OData Connected Service bit but I expect them to be generating the same code.

    I'll tidy up what I've done and commit it to GitHub for the Microsoft team to review over the next week or so.

  • MikeTherien Profile Picture
    15 on at
    RE: OData Properties have spaces

    I did not know the odata-cli existed.  Does it generate the same code as the OData connected service?  Unfortunately I cannot download a file on a public forum.

    Regardless, I feel this is an issue that the Dynamics team needs to fix since it breaks the specification.  I have already opened a ticket but have gotten little response.

  • bagavan Profile Picture
    5 on at
    RE: OData Properties have spaces

    Hello Phillip, Can you please let us know what you did to patch the odata-cli?

  • pmke Profile Picture
    10 on at
    RE: OData Properties have spaces

    Hi Mike.  I've stumbled across this and have patched odata-cli to manage the space issue.  It generated this file which at least compiles.

    It's working for what I need.  Please feel free to give it a run and let me know if I've busted anything in the process.

    Phil.

     

    Reference.zip

  • MikeTherien Profile Picture
    15 on at
    RE: OData Properties have spaces

    The problem is Navigation Properties were added that contain spaces.

    Per the OData spec for navigation properties (docs.oasis-open.org/.../odata-csdl-xml-v4.01.html), the name must be a Simple Identifier (http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html#sec_SimpleIdentifier) that cannot include a space.

    It appears spaces were added that shouldn't be.

    As a result, the OData generation tool (supplied by Microsoft for Visual Studio) fails to properly generate C# code.

    This has been a major blocker for us as we head to our initial deployment of Dynamics 365.

  • André Arnaud de Calavon Profile Picture
    294,916 Super User 2025 Season 1 on at
    RE: OData Properties have spaces

    Hi Mike,

    Have you tried to replace the space with the URL encoding (%20)?

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 501 Most Valuable Professional

#2
Saalim Ansari Profile Picture

Saalim Ansari 313

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 310

Overall leaderboard

Product updates

Dynamics 365 release plans