Invalid Uri:Uri 方案太长。UriFormatException”在 Dynamics-CRM FetchXML 中

Guy*_*y E 4 dynamics-crm fetchxml postman

我正在尝试使用FetchXML get request查询动态 CRM系统。 当我使用特定的属性\过滤器时,会出现错误: “无效的 Uri:Uri 方案太长。UriFormatException” 。例如:当尝试使用带有“on-or after”运算符的过滤条件时,引用带有时间戳的日期时间。我越来越:

初始查询很大并且有效,但是当我缩短查询并使用特定属性时,会出现错误。我无法指出问题所在。请参阅我的代码,例如:这不起作用:

<filter>
  <condition attribute="scheduledend" operator="le" value="2020-03-16T10:23:30" />
</filter>
Run Code Online (Sandbox Code Playgroud)

这是有效的,但没有时间戳:

<filter>
  <condition attribute="scheduledend" operator="on-or-before" value="03/16/2020" />
</filter> 
Run Code Online (Sandbox Code Playgroud)

让我强调一下——

<filter>
  <condition attribute="scheduledend" operator="le" value="2020-03-16T10:23:30" />
</filter>
Run Code Online (Sandbox Code Playgroud)

如果我删除一些查询属性或过滤器可能会起作用 - 所以这只是一个例子 - 我找不到工作\不工作的模式。这个问题的根本原因可能是什么?

Aro*_*ron 7

我突然意识到,由于冒号:是 HTTP URI 的正常部分,因此时间戳中的冒号可能会触发该问题。根据标准URL编码:编码为%3A. 也许可以尝试一下。

另一个考虑因素是单引号是合法的 URL 字符,但双引号是不安全的,因此可以在 FetchXML 中切换到单引号:

<condition attribute='scheduledend' operator='le' value='2020-03-16T10%3A23%3A30' />