Hi,
how to generate the fetchxml to retrieve accounts without contacts, leads and Opportunities ?
*This post is locked for comments
Thank you Alex! I did not know that. :-)
Hi Christian,
that's a bit of a misconception. You can create that fetch.. see above - it works.. You just can't create such a fetch using advanced find.
Actually, it's not even my invention:)) Here is the original:
Hi Sateesh
You cannot retrieve accounts, that does not have child records, with fetchxml.
What you can do is, create a marketing list that includes accounts which does have these child records. And then you create another marketing list which includes all accounts not present in the first marketing list.
Hi Sateesh,
you can try this fetch:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="account">
<attribute name="name" />
<attribute name="primarycontactid" />
<attribute name="telephone1" />
<attribute name="accountid" />
<order attribute="name" descending="false" />
<filter type="and">
<condition entityname="lead" attribute="leadid" operator="null" />
<condition entityname="contact" attribute="contactid" operator="null" />
<condition entityname="opportunity" attribute="opportunityid" operator="null" />
</filter>
<link-entity name="opportunity" from="parentaccountid" to="accountid" link-type="outer">
</link-entity>
<link-entity name="contact" from="parentcustomerid" to="accountid" link-type="outer">
</link-entity>
<link-entity name="lead" from="parentaccountid" to="accountid" link-type="outer">
</link-entity>
</entity>
</fetch>
Hi Gopalan,
I might have misunderstood but he just want get accound datas, he wrote "without contacts, leads, opportunities"
--
Hi Sateesh,
You can use "Advanced Find" to get fetchxml.
Open advanced find > prepare filters and columns > use "download fetchxml" button
You can also use XrmToolbox 's FetchXML Builder plugin
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156