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:
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.