【问题标题】:MS CRM: How can I query for phone calls without Recipient ("Call To")MS CRM:如何在没有收件人的情况下查询电话(“呼叫”)
【发布时间】:2015-05-21 11:10:46
【问题描述】:

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

【问题讨论】:

    标签: dynamics-crm dynamics-crm-2013 fetchxml


    【解决方案1】:

    我觉得你应该试试。

    <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为空这是错误的,你必须检查party id而不是activitypartyid。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多