web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unable to delete disabled business units and associated teams

(1) ShareShare
ReportReport
Posted on by

I have some business units in CRM I want to delete but I get generic SQL error messages when trying to do so.  I have tried the following:

  • Removed all users from the business unit
  • Deleted all queues associated to the business unit
  • Disabled the business unit
  • Tried to delete the business unit as System Admin and CRM Admin

I am using CRM 2011 on premise.

Any ideas?
Thanks, Jennifer

Error message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #FC38EE20Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
  <Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #FC38EE20</Message>
  <Timestamp>2015-06-11T21:08:46.4085069Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204784</ErrorCode>
    <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>Generic SQL error.</Message>
    <Timestamp>2015-06-11T21:08:46.4085069Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    mscrmba Profile Picture
    on at

    Hi Jenni,

    The errors likely mean that you have data in other tables that references the data you are trying to delete.

    Hex of these error numbers give you:

    80040217

    80044151  This forum thread may help:

    community.dynamics.com/.../82310

    Otherwise:

    Business-owned entities, records e.g. Users, or,  Equipment records, have a field named owningbusinessunit

    Have you deleted the associated Team?

    Do you have any Activity records that link to the Business Unit (or a disabled user/resource that links to that business unit) you are trying to delete?  

    Some people experience queue-related issues:

    edwardsdna.com/.../delete-business-unit-crm-2011

    Several ways to handle it - some less likely to potentially cause issues than others.  Try these links for starters:

    dba.stackexchange.com/.../the-delete-statement-conflicted-with-the-reference-constraint

    stackoverflow.com/.../i-got-error-the-delete-statement-conflicted-with-the-reference-constraint

    If all else fails you can rename business units - if that is an option for you.

  • Community Member Profile Picture
    on at

    Hi,

    At first u need to delete/remove/assign-another-BU teams which is on that business unit.

    After that disabled your BU

    Than try to delete BU

    I hope it helps.

    Thanks and Regards

    Sushil Rai

  • Suggested answer
    Community Member Profile Picture
    on at

    Actually, you may not be able to 'delete' them at all.  The trouble is that if you have a lot of inactive/completed activities associated with those BU's and Teams, from the CRM UI you won't be able to reassign them to another BU or Team.  Once an activity (E-mail, task, phone call, etc.) is completed, there is no way to re-open them to re-assign them.  It is possible to do this in the SDK, but it would reset all the modified dates on those records.

  • Community Member Profile Picture
    on at

    Thanks. Actually I am really trying to delete the default Team associated with the BU and it won't let me as long as the BU is still in the system (even though the BU is inactive). Do you know if there is a way to get rid of the Team?

  • Community Member Profile Picture
    on at

    At first remove all those associated resources,

    After than disable/delete your team.

  • Community Member Profile Picture
    on at

    this really helped, thanks a lot!, in my case disabled users were linked to some of the business units, because of which i was unable to delete the business units. only have one concern though, i am not able to delete even  when that business unit is not linked to any entity whatsoever. it gives azure application id not found for the user, i am not sure what this error means.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans