Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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

Categories:
  • KoJaPD Profile Picture
    595 on at
    Re: Changing parent Business Unit

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

  • EBMRay Profile Picture
    1,710 on at
    Re: Changing parent Business Unit

    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
    595 on at
    Re: Changing parent Business Unit

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

  • KoJaPD Profile Picture
    595 on at
    Re: Changing parent Business Unit

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

  • EBMRay Profile Picture
    1,710 on at
    Re: Changing parent Business Unit

    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
    595 on at
    Re: Changing parent Business Unit

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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics