Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

How to get E-Mails without ActivityParty of type 'Contact'?

(0) ShareShare
ReportReport
Posted on by 21

I'm trying to get all email records which have no relationship to a contact. Here is my current FetchXML:

  
    
    
    
    
    
    
      
    
    
      
        
      
      
    
  

It also returns records that have contacts as ActivityParty. Do I miss something here or is this a limitation of FetchXML?

  • alx.kpk Profile Picture
    alx.kpk 21 on at
    RE: How to get E-Mails without ActivityParty of type 'Contact'?

    Sorry, I was wrong. I oversaw the meaning of entityname="ap" in the condition and didn't notice FetchXML Builder is not using this attribute. Query seems to work pretty fine. Thanks a lot!

  • alx.kpk Profile Picture
    alx.kpk 21 on at
    RE: How to get E-Mails without ActivityParty of type 'Contact'?

    Thanks for the input. Unfortunately this FetchXML query returns 0 records.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: How to get E-Mails without ActivityParty of type 'Contact'?

    Hello,

    Check the following FetchXml:

      
        
        
        
        
        
        
        
          
        
        
          
            
          
        
      
    

    Check this KB that explains how it works - docs.microsoft.com/.../use-fetchxml-left-outer-join-query-records-not-in

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans