Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

fetchXML possible to combine or filter on different hierarchy?

$
0
0

hi all, 

i think about, if its possible to create a filter type=or over linked-entities?

This is my xml:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"><entity name="product"><attribute name="name" /><filter type="and"><condition attribute="statecode" operator="ne" value="1" /><condition attribute="new_productbez" operator="null" /><condition attribute="new_its_product_name_with_manufact" operator="not-null" /></filter><link-entity name="new_text_content" from="new_productid" to="productid" alias="aa"><filter type="and"><condition attribute="new_content_categoryid" operator="eq" uiname="productbez" uitype="new_content_category" value="{AB0ECEC0-9E7E-41D3-B0D5-96510803670D}" /><condition attribute="new_content_providerid" operator="in"><value uiname="xxx" uitype="new_content_provider">{EE1E1664-139D-4155-969F-A12F53E7A535}</value><value uiname="zzz" uitype="new_content_provider">{B7862C0D-75C5-4781-B5D9-BC98697B7029}</value></condition></filter><link-entity name="new_contenttagxref" from="new_producttextid" to="new_text_contentid" alias="ab"><filter type="and"><condition attribute="new_contenttypeid" operator="in"><value uiname="productbez, short" uitype="new_content_tag">{C5BC6C63-F3B7-4BB3-8F74-3D9805F4C418}</value><value uiname="productdesc, short" uitype="new_content_tag">{FAA2A513-0F1B-4E03-AC2D-E03DEC5C2D81}</value></condition></filter></link-entity></link-entity></entity></fetch>


and what i need is to match all products which have

- a linked entity with uiname="productbez, short" or "productdesc, short"

OR

- if the attribute "new_its_product_name_with_manufact" direktly in product is not null..

and this is the whole problem.
Till now, i only get it working if i create to views

one for

- all products which have the attribute "new_its_product_name_with_manufact" (directly in product) isnt null

and onf for

- all produts which have a link-entity down to attribute "new_contenttypeid" which have a uiname = "productbez, short" or "productdesc, short" 

but not combined, because i didnt know how to write the xml for or-condition which have 1 part of the or directly in product und the other part of the or in a subordinated entity.

any help?

:-(

Thx, Greets PeB



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>