Fetchxml с (условие 1 или условие 2) и условие 3

Мне нужно создать представление в 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>

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>
Другие вопросы по тегам