首页 > 解决方案 > 基于两个相关实体的属性的 FetchXML 或条件

问题描述

此 FetchXML 语句的要求是:

我尝试使用开箱即用工具 XRMToolbox FetchXML Builder 配置过滤器,访问官方 CRM 社区论坛并阅读 FetchXML 文档。尽管如此,我能想到的最好的还是如下:

<fetch version="1.0" mapping="logical">
   <entity name="ebs_opportunityinternshipunit">
      <attribute name="ebs_name" />
      <attribute name="createdon" />
      <attribute name="ebs_opportunityinternshipunitid" />
      <order attribute="ebs_name" descending="false" />
      <filter type="and">
         <condition attribute="createdon" operator="last-week" />
         <filter type="or">
            <condition entityname="ab" attribute="ownerid" operator="eq-userid" />
            <condition entityname="ac" attribute="ownerid" operator="eq-userid" />
         </filter>
      </filter>
      <link-entity name="opportunity" from="opportunityid" to="ebs_opportunity" link-type="inner" alias="aa">
         <link-entity name="account" from="accountid" to="parentaccountid" link-type="inner" alias="ab" />
         <link-entity name="account" from="accountid" to="mitacs_partner2" link-type="inner" alias="ac" />
      </link-entity>
   </entity>
</fetch>

标签: dynamics-crmdynamics-crm-onlinefetchxml

解决方案


推荐阅读