【问题标题】:Understanding Link-entity in FetchXML了解 FetchXML 中的链接实体
【发布时间】:2019-04-12 11:07:58
【问题描述】:

我知道<link-entity>是用来做join的,但是你能帮我把下面的翻译成英文吗?

<entity name = "example">

*insert a bunch of attributes*

     <link-entity name="providercertification" from="providerid" to="vendorid" alias="aa">

我知道&lt;link-entity&gt; 用于连接,但没有指定连接类型,所以这让我很失望。如果未指定连接类型,链接实体如何工作?是自动内连接吗?

另外,from 部分适用于哪一列to?第一个实体或&lt;link-entity> 中指定的实体?

from 部分的相同问题。

【问题讨论】:

标签: dynamics-crm fetchxml


【解决方案1】:

根据documentation,以下查询是完全有效的,这意味着aliasfromlink-type 是可选的。

from 始终指代与链接实体节点相同的实体(在这种情况下,systemuser 的主键 systemuserid)。 to 指实体父节点的属性(本例中为accountowninguser

   <entity name='account'>   
      <attribute name='accountid'/>   
      <attribute name='name'/>   
      <link-entity name='systemuser' to='owninguser'>   

Use a left outer join in FetchXML to query for records "not in"

outer join 需要明确的link-type='outer',但inner join 是默认值。

有趣的是,Fetchxml 充满了surprises。也可以参考FetchXML schema

【讨论】:

    猜你喜欢
    • 2020-10-16
    • 1970-01-01
    • 1970-01-01
    • 2019-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-01
    • 1970-01-01
    相关资源
    最近更新 更多