Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

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

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,321 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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans