Dynamics 365 – The record could not be deleted because of an association

The record could not be deleted because of an association

The record cannot be deleted because it is associated with another record. If you contact support, please provide the tecnical details.

This is normally a horrible error message to come across and one I’ve been dealing with thanks to the Sample Data feature of CRM bugging out on me and leaving me with the job of removing everything myself.

Luckily the tools are there to sort this out in a logical manner.

recordCouldNotBeDeleted1

Locating Associated Records

The first step to removing the associated records which are stopping you from deleting a record is to figure out what type of records can restrict deletions. To do this we’ll view entity relationships.

  1. Navigate to Settings > Customizations.
  2. Click ‘Customize the System’.
  3. Locate the type of entity you want to delete (as an example I’ll use Accounts).
  4. Navigate to ‘1:N Relationships’ for the entity.
  5. In the window locate any relationships who’s ‘Type of Behaviour’ is equal to ‘Referential, Restrict Delete’.
  6. Take a note of the Related Entity of each of those relationships, these are the types of records which could be restricting your ability to delete the record.
    • In the case of Accounts, by default this is Entitlements, Contracts, Cases, Opportunities, and Actual although your relationships may vary.

Dealing with Associated Records

  1. Using advanced find or the related items menu for the record look through the noted record types ensuring any of those records are deleted.
  2. Once all related records are deleted you will be able to delete the main record.
Advertisement

3 thoughts on “Dynamics 365 – The record could not be deleted because of an association

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.