locked
How to Upgrade OData version to 2.0 RRS feed

  • Question

  • Hi,

    I've been writing a webresource that uses OData, but I have ran into a wall in that I need to use the $count feature. But I keep getting a response:

    After doing some research I found that I need to upgrade the OData to 2.0:

    The following data service configuration behaviors require version 2 of the OData protocol, or later versions:

    • Support for count requests.

    • Support for the $select query option for projection.

    But all of the documentation shows how to do it via C#. Isn't there a config setting in the web app or can I do it through the dynamics interface or is it something different such as I need to upgrade to .NET 4?

    Wednesday, February 22, 2012 5:57 PM

Answers

  • If you are trying to use the CRM OData endpoint you should note the following from the SDK:

    Unsupported System Query Options

    Microsoft Dynamics CRM 2011 does not support using the following system query options: $inlinecount $count $format

    • Marked as answer by javaman21011 Thursday, March 1, 2012 8:31 PM
    Wednesday, February 22, 2012 7:11 PM

All replies

  • If you are trying to use the CRM OData endpoint you should note the following from the SDK:

    Unsupported System Query Options

    Microsoft Dynamics CRM 2011 does not support using the following system query options: $inlinecount $count $format

    • Marked as answer by javaman21011 Thursday, March 1, 2012 8:31 PM
    Wednesday, February 22, 2012 7:11 PM
  • One option is you could use the Soap endpoint and use a FetchXML query to get the count, its no where near as clean but like @Kheiman said $count isn't supported right now


    .NET MVP / Microsoft Regional Director / http://blog.davidyack.com / http://crm.davidyack.com

    Friday, February 24, 2012 7:49 AM
  • Shoot, thanks kheiman!

    I'll give that a try David, but if it doesn't work I already figured out how to use the __next element. Sadly that will limit each query to 50 per request.

    Thursday, March 1, 2012 8:33 PM