Dynamics CRM:检查文件附件文件名是否包含 unicode“#”的 Odata 查询

Dynamics CRM: Odata query that checks if the file attachment file name contains the unicode '#'

场景:我在 Dynamics CRM 2011 中有一个带有附件的自定义实体。我想查询那些文件名包含哈希标记 ('#') 的附件。假设我附上了一些文本文件。 kdk#ie.txt, Report.txt, & k!ke.txt 到自定义实体。 这是我的 Odata 查询的结果。 错误代码:

//ORGANIATION/XRMServices/2011/OrganizationData.svc/AnnotationSet?$filter=ObjectId/Id eq guid'{GUID HERE}' and IsDocument eq true and substringof('#',FileName)

Return:错误请求

因为它是 unicode,所以我在字符串参数上尝试了以下操作。 '\u0023' 'U+0021' 'w%u0023'

但 return 为 0 或 Bad Request

我测试了'!' & 'Report' 成功了 return 1 分别。它似乎只对 #.

不起作用

知道为什么我没有得到预期的结果吗?

非常感谢。

TIA

“#”符号是URL中的特殊字符。它必须被编码以不创建无效的 URL。 msdn.microsoft.com/en-us/library/aa226544(SQL.80).aspx