Hello,
While trying to change a parent business unit of a business unit it is throwing an SQL query exception without showing the SQL error code details. Below are the error details:
`Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 547
at Microsoft.Crm.Dialogs.ChangeParentDialogPage.ConfigureForm() +0x26f
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) +0x91
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +0x7
at System.Web.UI.Control.PreRenderRecursiveInternal() +0x54
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x6d3
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e) +0x11b
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x95a
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x69
at System.Web.UI.Page.ProcessRequest() +0x14
at System.Web.UI.Page.ProcessRequest(HttpContext context) +0x38
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +0x18d
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +0x64
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +0x15: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6CDC8B69Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>d24476a0-5fc2-48c3-9049-32eda19c29f3</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message>System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 547
at Microsoft.Crm.Dialogs.ChangeParentDialogPage.ConfigureForm() +0x26f
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e) +0x91
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +0x7
at System.Web.UI.Control.PreRenderRecursiveInternal() +0x54
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x6d3
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e) +0x11b
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x95a
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +0x69
at System.Web.UI.Page.ProcessRequest() +0x14
at System.Web.UI.Page.ProcessRequest(HttpContext context) +0x38
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +0x18d
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +0x64
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +0x15: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6CDC8B69</Message>
<Timestamp>2022-11-28T10:22:22.4373023Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>d24476a0-5fc2-48c3-9049-32eda19c29f3</ActivityId>
<ErrorCode>-2147204784</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message> Sql error: Generic SQL error. CRM ErrorCode: -2147204784 Sql ErrorCode: -2146232060 Sql Number: 547</Message>
<Timestamp>2022-11-28T10:22:22.4373023Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
Could you please advise what will be the solution to resolve the issue?
Best regards,
Julien
@Julien2 , are you sure that what you are trying to do does not create a circular refernce between already existing relationships between other business units, therefore creating an impossible hierarchy?
Hello @KoenJanssensPD ,
If I choose a different BU value it works perfectly for the same BU. However, when I choose the Organization-level option, it fails with this SQL server code error.
Why might the hierarchy be messed up since it works for the other BU's as well? Are you referring to the relationship behavior? Nothing has changed there.
Best regards,
it might have to do something with the hierarchy being messed up? also look at the "reparent" restraint
"sql number 547" points to a "constraint violation", so it seems that you are trying to do something that is prohibited on the database level. Look into the "parent business unit" relationship to what restraints are set...
Hello @KoenJanssensPD ,
Please find below the screenshots from the network trace:
Please let me know the next steps.
Best regards,
Julien
You might get more detailed information in the Network trace of the developers' tools in your browser.
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1