Skip to main content

I think this is something deep in NPSP that I can't see when you delete a HH account with an address and a contact.

 

I have a trigger on Account written using TDTM, and includes a BeforeDelete action. The code works as intended except in one specific instance. I have one Contact at a Household, and there is a record in the Address object (works fine when there is not an address). I click Delete on the Contact button, and it brings up the CON_DeleteContactOverride VF page. I click Delete Account, and I get an error:

 

The record you attempted to access has been deleted. The user who deleted this record may be able to recover it from the Recycle Bin. Deleted data is stored in the Recycle Bin for 15 days. 

 

But the error seems to be triggered just because I have BeforeDelete as a trigger action. If I remove all the code in my class that references BeforeDelete, I still get the error - so it seems to be something about invoking BeforeDelete with TDTM in this scenario that breaks something in NPSP. If I delete just delete the contact and leave the HH with no contacts, and then delete the HH it works fine...

9 answers
  1. May 15, 2023, 2:14 PM

    Did y'all ever find an answer to this? We just went live with SSH and I suddenly started getting the "You tried to merge a deleted record with another record. Choose a different record and try again." error message when neither Contact record is deleted. A perusal of the losing Contact's related records doesn't seem to be anything out of the ordinary that wouldn't get popped over to the winning Contact (Application, Ed History, Attribute, Relationship, Address) - all those are standard objects and I merged 2 dupes then suddenly couldn't merge remaining dupes anymore. 

0/9000