Error Deleting an Account Record – Associated with Another Record


One of our customers wasn’t able to delete an inactive Dynamics 365 (CRM) Account record – received the following error message:

The record could not be deleted because of an association

image

Log file:

<s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xmlns:xml=”http://www.w3.org/XML/1998/namespace” xml:lang=”en-US”>The object you tried to delete is associated with another object and cannot be deleted.</faultstring><detail><OrganizationServiceFault xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”><ActivityId>6e0cd8f8-71ef-4731-b277-3a3e8877b1db</ActivityId><ErrorCode>-2147220953</ErrorCode><ErrorDetails /><Message>The object you tried to delete is associated with another object and cannot be deleted.</Message><Timestamp>2017-02-25T04:20:38.7578308Z</Timestamp><ExceptionSource xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /><InnerFault><ActivityId>6e0cd8f8-71ef-4731-b277-3a3e8877b1db</ActivityId><ErrorCode>-2147220953</ErrorCode><ErrorDetails /><Message>The object you tried to delete is associated with another object and cannot be deleted.</Message><Timestamp>2017-02-25T04:20:38.7578308Z</Timestamp><ExceptionSource xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /><InnerFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /><OriginalException xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /><TraceText xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /></InnerFault><OriginalException xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /><TraceText xmlns:i=”http://www.w3.org/2001/XMLSchema-instance” i:nil=”true” /></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

It turns out that the error was due to an Order record associated with the Account record.  To confirm this – we can check the customization setting for the Microsoft Dynamics CRM Account entity’s 1:N Relationship with the related Order entity.  Then check the Type of Behavior – which is Parental.

image

When we open the details of this Parental setting – we can see that Delete is set to Restrict.

image

The options to resolve this Account delete error are

  1. Disassociate the Order to the Account
  2. Delete the Order first before deleting the Account

 

Contact me if you are looking for some Microsoft Dynamics 365 Sales/CRM help.

Frank Lee, Microsoft Business Solutions MVP Sales/CRM San Francisco Bay Area
Workopia, Inc. – Microsoft CRM Keeping it Simple!

Advertisements

About Microsoft Dynamics CRM Online

Microsoft Dynamics CRM and CRM Online specialist. Microsoft CRM MVP since 2006
This entry was posted in CRM On Premise, CRM Online, Dynamics 365, Microsoft CRM, Microsoft Dynamics CRM, Troubleshooting and tagged . Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s