Hi Everybody,
currently I am a bit struggling regarding creating a FetchXML to be used within a List for Dynamics Portal.
My Goal is to show a List menu only (Grid Configuration - List Actions), when an opportunity has NO sales order OR when a existing sales order has a specific value set AND the linked account in the opportunity has a specific field value set.
I try to show the menu only when:
1. Linked account of the opportunity has field set to XXX AND
2. no sales order for the opportunity exists OR
3. in case a sales order exists for the opportunity and a specific field is set (OptionSet ne value) within the sales order.
I am stuck with the or condition:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="opportunity">
<attribute name="name" />
<attribute name="customerid" />
<attribute name="estimatedvalue" />
<attribute name="statuscode" />
<attribute name="opportunityid" />
<order attribute="name" descending="false" />
<link-entity name="salesorder" from="opportunityid" to="opportunityid" link-type="outer" alias="at" />
<link-entity name="salesorder" from="opportunityid" to="opportunityid" link-type="inner" alias="so" />
<link-entity name="account" from="accountid" to="parentaccountid" link-type="inner" alias="au">
<filter type="and">
<condition attribute="rep_portal_sonderlogik_ausfuehren" operator="eq" value="283270002" />
</filter>
</link-entity>
<filter type="and">
<condition entityname="at" attribute="opportunityid" operator="null" />
</filter>
<filter type="or">
<condition entityname="so" attribute="rep_material_bestellt" operator="ne" value="283270002" />
</filter>
</entity>
</fetch>
I tried around some time, but somehow I receive always empty results.
I think there is something wrong with my and / or filterings.
Someone has an idea?
Thx Gerald