I am trying to retrieve columns from two different entities that are related to the account, one being a custom entity, using FetchXML. I have read multiple posts and I think I have the syntax correct, but based on the results I don't. Here is my is my query as it stands now.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"><entity name="account"><attribute name="name" /><attribute name="gsi_sourcecampaign" /><order attribute="gsi_sourcecampaign" descending="false" /><link-entity name="ree_dawsontrial" from="ree_account" to="accountid" alias="dawsontrial" link-type="outer"><attribute name="ree_trialstartdate" /><attribute name="ree_trialenddate" /></link-entity><link-entity name="salesorder" from="customerid" to="accountid" alias="order" link-type="outer"><link-entity name="salesorderdetail" from="salesorderid" to="salesorderid" alias="orderdetail"><filter type="or"><condition attribute="productid" operator="in"><value uiname="Dawson Diagnostic Wizard" uitype="product">{726B9BC1-6E74-E211-89D7-78E3B508542D}</value><value uiname="Dawson Diagnostic Wizard- Event" uitype="product">{D87528FC-98CC-E211-8DDF-78E3B508542D}</value><value uiname="Dawson Diagnostic Wizard-Field" uitype="product">{DD734EBC-98CC-E211-8DDF-78E3B508542D}</value></condition></filter><link-entity name="product" from="productid" to="productid" alias="product"><attribute name="name" /></link-entity></link-entity></link-entity></entity></fetch>
What I'm trying to do is to retrieve all the accounts that have either ordered a list of products (3 products) or that have a custom entity that has been created for that account.
Thank you for the help!!
Gary