【问题标题】:Return NULLS in FetchXML在 FetchXML 中返回 NULL
【发布时间】:2011-12-30 18:54:34
【问题描述】:

我正在使用 FetchXML 从 CRM 2011 查询数据以在 SSRS 2008 中构建报告。我的查询有效,但它不会返回链接到空实体的记录。这是我的查询:

<fetch>
      <entity name="appointment">
        <attribute name="scheduledstart" />
        <link-entity name="systemuser" from="systemuserid" to="ownerid">
            <attribute name="firstname" alias="ownerFirstName" />
            <attribute name="lastname" alias="ownerLastName" />
        </link-entity>
        <link-entity name="contact" from="contactid" to="new_contactperson">
            <attribute name="parentcustomerid" alias="parentaccount" />
            <attribute name="new_businessunit" alias="businessunit" />
        </link-entity>
        <attribute name="new_contactperson" />
        <attribute name="subject" />
        <attribute name="new_coldernotes" />
    <link-entity name="activityparty" from="activityid" to="activityid">
    <attribute name="participationtypemask" alias="participationtypemask" />
        <filter>
        <condition attribute="participationtypemask" operator="eq" value="9" />
        </filter>
        <link-entity name="systemuser" from="systemuserid" to="partyid">
            <attribute name="fullname" />
        </link-entity>
    </link-entity>
        <filter type="and">
            <condition attribute="scheduledstart" operator="on-or-after" value="@FromDate" />
            <condition attribute="scheduledstart" operator="on-or-before" value="@ToDate" />
        </filter>
      </entity>
</fetch>

例如,如果它链接到系统用户或联系人,如果这些记录为空,则约会记录不会返回。即使链接到空值,是否也可以返回记录?

谢谢!

【问题讨论】:

    标签: dynamics-crm dynamics-crm-4 dynamics-crm-2011 fetchxml


    【解决方案1】:

    想通了。需要添加link-type="outer"。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-19
      • 2016-11-07
      • 1970-01-01
      • 1970-01-01
      • 2020-01-11
      • 2021-02-22
      相关资源
      最近更新 更多