使用扩展的REST功能,例如Dynamics CRM中的包含 [英] Use extended REST functions like contains in Dynamics CRM

查看:99
本文介绍了使用扩展的REST功能,例如Dynamics CRM中的包含的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,特别是对于大数据,使用REST在Dynamics CRM中获取数据要比使用SOAP快得多.

As I noticed, fetching data in Dynamics CRM with REST is a lot faster then with SOAP especially for big data.

由于我是这个主题(REST)的新手,我想问一问是否有必要包括任何其他库以在查询中使用实例"contains"的功能.

Since I'm new to this topic (REST) I want to ask if it's necessary to include any additional library to use functions in my query for instance "contains".

如果我发送查询:

XrmServiceToolkit.Rest.RetrieveMultiple("ActivityPointerSet", 
"$filter=contains(Subject,'Test')&$top=10", 
function(results){ 
    console.log(results);
}, 
function(error){
    console.log(error);
},
function onComplete(){

}, false);

我收到错误消息:错误:400:错误的请求:未知函数包含"在位置0.

I get the error message: Error : 400: Bad Request: Unknown function 'contains' at position 0.

使用fetchXML时,我得到了或多或少的复杂查询.在大多数情况下是否可以将它们更改为REST?

I got more or less intricate queries yet with fetchXML. Is it in most cases possible to alter them to REST?

最好的问候

推荐答案

您不能直接在Odata Queries中使用C# QueryExpression函数.您必须根据Odata Syntax/Functions对其进行修改.

You cannot use the C# QueryExpression functions in Odata Queries directly. You have to modify them according to Odata Syntax/Functions.

请将您的查询更改为以下内容,然后重试:

Please change your query to below and try again:

select=*&$filter=substringof('Test',Subject)&$top=10

一个很好的工具来生成复杂的Odata Queries Dynamics XRM工具

A very good tool to generate complex Odata Queriesis Dynamics XRM Tools

将选择标准添加到CRM 2011中的REST查询中

这篇关于使用扩展的REST功能,例如Dynamics CRM中的包含的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆