2015-09-29 2 views
1

Мне нужно создать представление в MS Dynamics CRM 2015, которое добавит пару условий AND к ряду условий OR. Следующее не работает, и больше ничего не может быть разрешено.Fetchxml with (условие 1 или conditon 2) и условие 3

<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> 
Смежные вопросы