在 FetchXML 中返回 NULL
我正在使用 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>
例如,它链接到系统用户或联系人,如果这些记录为空,则约会记录不会返回。即使它链接到空值,是否可以返回记录?
谢谢!
I am querying data from CRM 2011 using FetchXML to build a report in SSRS 2008. My query works, but it won't return records that link to a entity that is null. This is my Query:
<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>
So for example, where it links to the systemuser or contact, if those records are null the appointment record doesn't return. Is there away to return records even if it's linked to a null?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想通了。需要添加 link-type="outer"。
Figured it out. Needed to add link-type="outer".