Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)
Under review by Community Managers

Under review

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

Found a bug about "@odata.nextLink" when query data using the Web API

Posted on by 10

Hello ,

I met a bug when query data using the Web API:

if the the returned data have more than one page.

and the filter value include datetime, then the returned nextpage link is not correct:

entity: contact

return properties: more than 100

filter: "modifiedon gt '2017-05-15T08:54:00Z'"

when try to get the second page, got error

{
"Message": "Invalid URI: The Uri scheme is too long.",
"ExceptionMessage": "Invalid URI: The Uri scheme is too long.",
"ExceptionType": "System.UriFormatException",
"StackTrace": " at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)\r\n at System.Uri.CreateUri(Uri baseUri, String relativeUri, Boolean dontEscape)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n at System.Web.OData.Routing.ODataPathRouteConstraint.Match(HttpRequestMessage request, IHttpRoute route, String parameterName, IDictionary`2 values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.ProcessConstraint(HttpRequestMessage request, Object constraint, String parameterName, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.ProcessConstraints(HttpRequestMessage request, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)\r\n at System.Web.Http.WebHost.Routing.HttpWebRoute.GetRouteData(HttpContextBase httpContext)",
"ErrorCode": "0x0"
}


debug with rest client:

3362.pastedimage1568800553011v1.png

i found that in the nextlink uri, the filter is not encode correctly.

the character ‘:’ was escape to be encode on server side.

I think this is bug from dynamic crm.

Is this can be fix, or any suggestion to avoid this issue ?

Thanks.

Regards.



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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans