动态 CRM - MS CRM: 如何在没有收件人的情况下查询电话 ( "Call To" )



我在MS CRM 2013系统中通过Excel导入了一堆phoneccall,但其中一些没有设置收件人(Call To)字段。现在我们想通过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>

最新更新