使用Odata查询在CRM实体之间加入和过滤条件 [英] Join and filter condition between CRM entities using Odata query

查看:131
本文介绍了使用Odata查询在CRM实体之间加入和过滤条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我下面的fetchXml查询的oData等效查询吗?

Can someone please tell me the oData equivalent query for the below fetchXml query?

<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">
<entity name="customeraddress">
<attribute name="name"/>
<link-entity name="contact" alias="ab" to="parentid" from="contactid">
<filter type="and">
<condition attribute="statecode" value="0" operator="eq"/>
</filter>
</link-entity>
</entity>
</fetch>

我仔细检查了一下,并尝试了此处提到的内容: OData 但不起作用.

I looked up a lot and tried what was mentioned here: Filter on Expanded entities in OData but doesn't work.

推荐答案

不幸的是,无法构建将对相关实体进行扩展并对其进行过滤的OData查询,但是如果您使用Dynamics CRM 2016,则新的WebApi可以使用clear FetchXml用于数据查询.

Unfortunately it is not possible to build OData query that will include expand on related entity and filter on it but if you work with Dynamics CRM 2016 new WebApi can use clear FetchXml for data querying.

重新检查以下文章:

  • http://debajmecrm.com/2016/01/04/leverage-web-api-to-execute-your-system-views-personal-views-and-custom-fetchxml-in-dynamic-crm-2016/
  • https://community.dynamics.com/crm/b/crminogic/archive/2015/12/28/execute-fetchxml-using-web-api-in-dynamics-crm-2016

这篇关于使用Odata查询在CRM实体之间加入和过滤条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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