【问题标题】:Fetchxml with ( condition 1 or conditon 2) and condition 3带有(条件 1 或条件 2)和条件 3 的 Fetchxml
【发布时间】:2015-09-29 17:18:15
【问题描述】:

我需要在 MS Dynamics CRM 2015 中创建一个视图,将几个 AND 条件添加到一系列 OR 条件中。以下不起作用,似乎不允许其他任何事情。

   <fetch version="1.0" output-format="xml-platform" mapping="logical" >
  <entity name="new_crn" >
    <attribute name="new_name" />
    <filter type="or" >
      <condition value="14" operator="eq" attribute="new_totalprod" />
      <condition value="14" operator="lt" attribute="new_totalprod" />
      <condition operator="between" attribute="new_totalprod" >
        <value>53</value>
        <value>93</value>
      </condition>
        ...  
    <filter type="and">
      <condition operator="eq" attribute="date_sent" >
    </filter>
    </filter>
  </entity>
</fetch>

【问题讨论】:

    标签: fetchxml


    【解决方案1】:

    我能够通过将两个过滤器嵌入另一个过滤器来修改 fetchxml。这完成了我需要它做的事情。

    <fetch version="1.0" output-format="xml-platform" mapping="logical" >
      <entity name="new_crn" >
        <attribute name="new_name" />
       <filter type="and">
         <filter type="or" >
            <condition value="14" operator="eq" attribute="new_totalprod" />
            <condition value="14" operator="lt" attribute="new_totalprod" />
            <condition operator="between" attribute="new_totalprod" >
              <value>53</value>
              <value>93</value>
            </condition>
            ...  
            <filter type="and">
             <condition operator="eq" attribute="date_sent" >
            </filter>
          </filter>
        </filter>
      </entity>
    </fetch>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-02
      • 1970-01-01
      • 2011-12-31
      • 1970-01-01
      • 1970-01-01
      • 2018-09-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多