Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

FetchXML

Posted on by 70

I'm trying to get a list of contacts where the Account (Company name) they belong to has a particular dealer brand record (custom) and they don't have a internal id (custom) record with a certain product. I can't figure out how to get it to show those that have an internal id with a different product or they don't have a internal id record at all. 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
<entity name="contact" >
<attribute name="fullname" />
<attribute name="telephone1" />
<attribute name="contactid" />
<order attribute="fullname" descending="false" />
<filter type="and" >
<condition attribute="statecode" operator="eq" value="0" />
<condition attribute="emailaddress1" operator="not-null" />
</filter>
<link-entity name="account" from="accountid" to="parentcustomerid" link-type="inner" alias="aa" >
<link-entity name="lvp_dealerbrand" from="new_dealerid" to="accountid" link-type="inner" alias="ab" intersect="true" >
<filter type="and" >
<condition attribute="lvp_brand" operator="eq" uiname="Brand1" uitype="lvp_brand" value="{22040AB5-6FFF-E611-80EE-C4346BAD8294}" />
</filter>
</link-entity>
<link-entity name="tec_internalid" from="tec_account" to="accountid" link-type="outer" alias="ac" intersect="true" >
<filter type="and" >
<condition attribute="tec_product" operator="ne" uiname="Product1" uitype="product" value="{5836F9B1-341C-E611-80E6-6C3BE5A878BC}" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>


Is what i'm trying to do possible?

*This post is locked for comments

  • Barkuma Profile Picture
    Barkuma 80 on at
    RE: FetchXML

    Why don't you just get them to give you a call (or you give them a call) to at least get them on the list.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans