Dynamics crm MS CRM:如何查询没有收件人的电话(“呼叫至”)

Dynamics crm MS CRM:如何查询没有收件人的电话(“呼叫至”),dynamics-crm,dynamics-crm-2013,fetchxml,Dynamics Crm,Dynamics Crm 2013,Fetchxml,Wie通过Excel在我们的MS CRM 2013系统中导入了一系列电话呼叫,但其中一些没有设置收件人(呼叫)字段。现在我们想通过FetchXml查询这些记录。我们怎样才能做到这一点 我尝试了以下方法,但我接到了很多收件人的电话。你能帮忙吗 <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" > <entity name="activitypointer" &

Wie通过Excel在我们的MS CRM 2013系统中导入了一系列电话呼叫,但其中一些没有设置收件人(呼叫)字段。现在我们想通过FetchXml查询这些记录。我们怎样才能做到这一点

我尝试了以下方法,但我接到了很多收件人的电话。你能帮忙吗

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
  <entity name="activitypointer" >
    <attribute name="activitytypecode" />
    <attribute name="subject" />
    <attribute name="statecode" />
    <attribute name="instancetypecode" />
    <attribute name="createdon" />
    <attribute name="regardingobjectid" />
    <attribute name="ownerid" />
    <attribute name="activityid" />
    <attribute name="prioritycode" />
    <attribute name="scheduledend" />
    <attribute name="createdby" />
    <order attribute="createdon" descending="true" />
    <order attribute="activitytypecode" descending="false" />
    <filter type="and" >
      <condition attribute="modifiedby" operator="eq-userid" />
      <condition attribute="activitytypecode" operator="eq" value="4210" />
    </filter>
    <link-entity name="systemuser" from="systemuserid" to="owninguser" alias="activitypointerowningusersystemusersystemuserid" >
      <attribute name="internalemailaddress" />
    </link-entity>
    <link-entity name="activityparty" from="activityid" to="activityid" link-type="outer" alias="ab" >
      <filter type="and" >
        <condition attribute="activitypartyid" operator="null" />
        <condition attribute="participationtypemask" operator="eq" value="2" />
      </filter>
    </link-entity>
  </entity>
</fetch>

我想你应该试试

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="phonecall">
    <attribute name="subject" />
    <attribute name="statecode" />
    <attribute name="prioritycode" />
    <attribute name="scheduledend" />
    <attribute name="createdby" />
    <attribute name="regardingobjectid" />
    <attribute name="activityid" />
    <order attribute="subject" descending="false" />
    <link-entity name="activityparty" from="activityid" to="activityid" alias="ab">
      <filter type="and">
        <condition attribute="participationtypemask" operator="eq" value="2" />
        <condition attribute="partyid" operator="null" />
      </filter>
    </link-entity>
  </entity>
</fetch>


与我的版本的区别在哪里?只需检查一个条件,您就可以编写一个条件,在链接实体activityparty中为null,这是错误的,您必须检查参与方id而不是activitypartyid。