Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / OData Properties have ...
Finance forum
Suggested answer

OData Properties have spaces

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
    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
    MikeTherien 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
    DSAnderson 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
    pmke 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
    MikeTherien 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
    bagavan 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
    pmke 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
    MikeTherien 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
    André Arnaud de Cal... 287,914 Super User on at
    RE: OData Properties have spaces

    Hi Mike,

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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans