Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Looking for an automated way to remove a contact from the TO and CC fields on emails

(1) ShareShare
ReportReport
Posted on by 2
I have a list of contact GUIDs for contacts that need to be deleted from the system. These contacts are on the TO and/or CC fields of many email records. I noticed that deleting the contact record does not delete the activity party or the reference to the deleted contact on the email, so I figured I must clean up the activity party record as well.
 
My idea was to create a flow that iterates through each contact GUID and deletes each one, then uses the same guid to look for any activity party records where the party ID = contactid, then delete each one. However, flow will not let me delete an activity party record:

Image
 
I figured the next option would be to first unrelate the contact with any emails first, but I'm unsure on how to do that. The closest I've gotten without hitting an error is this, but it had no effect on the activity party (the reference to the deleted contact still exists on the email:

 
Is there a better way to clean up these TO/CC references on deleted contacts? It's not necessarily hurting anything, but there are hundreds of thousands of these references that I'm sure are taking up a decent amount of memory. I also may not be able to delete every single contact on my list but would still like to remove them from the TO/CC fields at minimum. 
 
Thank you.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans