function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Brandon YoungsBrandon Youngs 

Error while deleting Accounts.

I get the following error while trying to delete an account:

"Your attempt to delete (Name of Account) could not be completed because it is associated with the following accounts. If the following table is empty, it is because you do not have access to the records restricting the delete."

And the table shows only 1 record, that record is the account I tried to delete (verified by ID).

The account is not associated to itself in any way with a custom lookup or elsewhere. I'm not sure what could be causing this I'm using an Admin user with all of the delete permissions you would normally need.
Sumitkumar_ShingaviSumitkumar_Shingavi
This happens because your account might be parent account of some other account on which you have no permission. Are you checking this as System Administrator? Is Account OWD is private? This only happens if relationship is done using Maste-Detail relationship.

Hope this helps!
 
Andy BoettcherAndy Boettcher
Is it part of an Account heirarchy?
Brandon YoungsBrandon Youngs
The account is the only account in the account hierarchy and no records have the account as the parentId.
Björn Wiberg 4Björn Wiberg 4
You most likely have a Lookup to another record that has a Master-Detail to Account. I encountered this and it turned out I had a lookup to opportunity. That field was populated with an opportunity which account was the account I tried to delete. I cleared the field and it worked.
Lucas DessaignesLucas Dessaignes
I have the exact same issue except that I'm trying to delete a custom object instead of a account. I've seen many things about "deleted fields" but I'm don't think it's related since I did not delete anything. I just want to delete a record and it seems to be somehow related to itself even if it's not the case (I check with salesforce inspector pluggin).

Any hint ?