If I understand your problem, there are emails that have an old System Admin still referenced on either 'CC' or 'BCC'. You don't want to delete the emails, just the reference to the old Sys Amdin. Is that correct? What I am about to suggest is unsupported, but hey, CRM2015 is unsupported at this point, so your only risk is corrupting the database. I will assume you have a backup before attempting what I am about to suggest.
The reference to all Receivers of Email (To, CC and BCC) reside in a table called
ActivityParty. If you are On-Prem with CRM 2015, you can just delete those ActivityParty Records. To verify this, I did a test on a Dev instance of CRM. I referenced one recently generated email that still has a former Sys Admin on the BCC. He is on about 6,000 emails this year. I grabbed the Id from one of the Emails and ran this Query to get the specific
ActivityPartyId.
SELECT E.subject, AP.PartyIdName, E.ActivityId, AP.ActivityPartyId
from activityparty AP
join Email E
on AP.ActivityId = E.ActivityId
where
E.activityid = '{7643AEB7-916C-EC11-9107-005056A39D25}'
and AP.partyidname = 'Brad Pitt' --Obviously made up
I then deleted the Activity Party within a Transaction (In case I made a mistake) using the following Query
begin tran
DELETE
from ActivityPartyBase
where activitypartyid = '{4B6838C4-CA17-DE11-A676-0014C2C128C3}'
--commit rollback
After running the delete, you do need to "commit" the transaction to release locks on the Tables. If you get more than the desired number of records deleted, then "rollback" the transaction. When I refreshed the Email, the Email was not corrupted and his reference was removed from BCC. Therefore, the test worked with no adverse results on CRM.
I now feel comfortable to run this Query, if I wished, to delete all 6,000 Email references to this Sys Admin for this year. It isn't bothering anybody in our Company, so I am going to leave it alone.
begin tran
DELETE
from ActivityPartyBase
where activitypartyid in (
select AP.ActivityPartyId
from activityparty AP
join Email E
on AP.ActivityId = E.ActivityId
where
AP.PartyId = '{4B6838C4-CA17-DE11-A676-0014C2C128C3}'
and E.CreatedOn > '1/1/22'
)
--commit rollback
There are supported ways to do it as well using a third-party tool like KingswaySoft. You can also do it using a Console App in Visual Studio, if you are familiar with the Sdk. I hope you have found this little tutorial helpful.
------------------------------
Gerry Yurko
Sofware Engineer III
Crown Castle Fiber Networks
Boxborough MA
------------------------------
Original Message:
Sent: Oct 12, 2022 06:06 PM
From: Ron Goetz
Subject: System Job Templates- Where Oh Where is My Sys Admin e-mail address? 2015.
Back story is that although we are now running D365, we still co-mingle and use CRM 2015 for clean up jobs such as bulk deletion tasks. My problem is that the SysAdmin has long left the company, but his e-mail and that of another departed cowroker still show up in the CC on those tasks. Since this is a System Job template, the entire From: CC: and To: fields are hidden away and darn if I can't find them. I tried using the CRM Mgt Console, but it did not reflect anything close to what the templates e-mail out?
Any thoughts are where these entities/fields are hidden? I would think that it shouldn't be so hard to edit a CC field, but first I have to find where it resides?
thanks in advance!
Ron

------------------------------
Ron Goetz
Application Support Analyst
Goddard Systems, Inc.
Freeport IL
------------------------------