Dynamics crm 获取两个相关实体的属性的XML或条件
此FetchXML语句的要求如下:Dynamics crm 获取两个相关实体的属性的XML或条件,dynamics-crm,dynamics-crm-online,fetchxml,Dynamics Crm,Dynamics Crm Online,Fetchxml,此FetchXML语句的要求如下: 返回所有“ebs\U Opportunity实习生单元”,其中 “createdon”是“上周” 及 “帐户”的“所有者”是“eq用户ID” “account”由“opportunity”的“parentaccountid”引用 或 “account2”的“所有者”是“eq userid” “account2”由“opportunity”的“mitacs_partner2”引用 我尝试过使用现成的工具、XRMToolbox FetchXML
- 返回所有“ebs\U Opportunity实习生单元”,其中
- “createdon”是“上周”
- 及
- “帐户”的“所有者”是“eq用户ID”
- “account”由“opportunity”的“parentaccountid”引用
- 或
- “account2”的“所有者”是“eq userid”
- “account2”由“opportunity”的“mitacs_partner2”引用
- “帐户”的“所有者”是“eq用户ID”
<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>
FetchXML不支持跨多个实体进行筛选。您试图在哪里使用此FetchXML?是否在自定义代码中?能否提供实体之间的关系,特别是ebs_opportunity IntershipUnit opportunity account之间的关系(它似乎与具有两种不同关系的自定义实体相连)此外,它还将有助于显示预期的数据输出和您的目标receiving@aron这是定制的FetchXML,但我希望它可以作为视图的过滤器。我以前做过这个。您必须导出解决方案,将自定义的FetchXML放在正确的位置,然后导入解决方案。@chowdhury ebs_opportunity与opportunity有N:1关系,opportunity与account有N:1关系。我想要返回的是所有ebs_opportunity,其中ebs_opportunity的opportunity帐户的所有者是当前用户。实际需求更加复杂,但一旦我能做到,我就可以做我需要做的任何事情。另外,我听说可以在FetchXML中组合多个FetchXML语句。这些可以实现我所寻找的结果吗?您可能需要将那些帐户链接实体设置为外部