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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Changing parent Busine...
Power Apps
Unanswered

Changing parent Business Unit

(0) ShareShare
ReportReport
Posted on by 1,710

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. ---&gt; 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&amp; 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>

 

ParentBusinessUnit.png

Could you please advise what will be the solution to resolve the issue?

Best regards,
Julien

I have the same question (0)
  • KoJaPD Profile Picture
    597 on at

    You might get more detailed information in the Network trace of the developers' tools in your browser.

  • EBMRay Profile Picture
    1,710 on at

    Hello @KoenJanssensPD ,

     

    Please find below the screenshots from the network trace:

    Error 2 Preview.png

    Julien2_0-1669733898916.png

    Please let me know the next steps.

     

    Best regards,
    Julien

  • KoJaPD Profile Picture
    597 on at

    "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...

  • KoJaPD Profile Picture
    597 on at

    it might have to do something with the hierarchy being messed up? also look at the "reparent" restraint

  • EBMRay Profile Picture
    1,710 on at

    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,

  • KoJaPD Profile Picture
    597 on at

    @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?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard