Вернуть NULLS в FetchXML - PullRequest
       55

Вернуть NULLS в FetchXML

3 голосов
/ 17 ноября 2011

Я запрашиваю данные из CRM 2011, используя FetchXML для создания отчета в 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>

Так, например, когда он ссылается на пользователя системы или контакт, если эти записи равны нулю, запись о встрече не возвращается.Есть ли возможность вернуть записи, даже если они связаны с нулем?

Спасибо!

1 Ответ

5 голосов
/ 17 ноября 2011

Разобрался.Необходимо добавить link-type = "external".

...