I have created an account "XYZ" and contact for this account(XYZ) as "ABC". Then I deleted the account then its contact got deleted, though account and contacts has lookup relationship still its child is getting deleted, which should not happen. Can anyone please tell me what is going on in the background, why is contact getting deleted? Please let me know if I am missing any important concept for these objects.

Thanks in Advance

1 Answer 1


Contacts, Opportunities, and other master-detail relationships are deleted when the account is deleted, following the rules listed here. https://help.salesforce.com/HTViewHelpDoc?id=account_del.htm&language=en_US

  • 1
    Contacts and Opportunities have master-detail relationships with Account EVEN THOUGH the AccountId field definition says that they have a lookup relationship - it's just one of those gotchas that you find out through experience
    – user735
    Commented Feb 3, 2015 at 17:07
  • even more confusingly, Oppos can be added w/o AccountId (though not through the standard page layout) so in that circumstance, they act like children of a lookup relationship
    – cropredy
    Commented Feb 3, 2015 at 21:06
  • The above attached link does not gives clarity. It says what happens if you delete an account, I want the reason why does it happens when there is lookup relationship. Why this unexpected behaviour? If you have any related answer to my question please comment. Commented Feb 4, 2015 at 5:00
  • 1
    Perhaps we are misunderstanding your question? The linked document explains that the native functionality of Salesforce deletes Contacts, Opportunities, Contracts, Activities, Notes, Attachments, Portal roles and groups, Partner relationships, and Relationship Group Members upon deletion of the Account. Does it matter 'why' if that is the reality of the application functionality? More importantly, are you trying to PREVENT this from happening? If so, that may be a better discussion?
    – HomerJ
    Commented Feb 4, 2015 at 15:19
  • "Does it matter 'why'??". Yes! it matter because we want to learn the basics clearly. No hard feelings, but yeah I want want to know the reason. Commented May 26, 2015 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .