Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

Post Author: Joe D365 |

A bug exists in CRM 2015 SP1 that prevents users from modifying the root Business Unit because the parent Business Unit is required but it has no value. In today's blog, we will go over the steps needed to work around this issue. Let's begin!

In this example CRM organization, we have two Business Units; bigmonkeymanufacturing is our root Business Unit and we have capuchingears set as a Business Unit under our root Business Unit, bigmonkeymanufacturing.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

When we need to make a change to capuchingears, such as entering a main phone number for example, the change happens as it should with no problems.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

If we try to make the same change to our base Business Unit, bigmonkeymanufacturing, you get an error message as shown below.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

However, with this being our root Business Unit, there is no parent Business Unit. The steps to resolve this problem are as follows:

1. Create a JavaScript web resource file:

a. In CRM, go to Settings -> Customizations -> Web Resources.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

b. Click on the New icon and name it ModifyParentBUField.

c. Set the type to Script (Jscript).

d. Click on the Text Editor and copy in the text below:

function ModifyParentBUcontrol()

{

var FORM_TYPE_CREATE = 1;

// get current TYPE and use it when u what it to run

var formType = Xrm.Page.ui.getFormType();

var ParentBUControl = Xrm.Page.getControl("parentbusinessunitid");

if (formType != FORM_TYPE_CREATE) {

if (ParentBUControl.getAttribute().getValue() == null)

{

ParentBUControl.setDisabled(true);

}

else

{

ParentBUControl.setDisabled(false);

}

}

}

e. Save the web resource.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

2. Use the JavaScript web resource file on the Business Unit form.

a. Open the Business Unit form in design mode.

b. Click on Form Properties.

c. Add the new web resource exactly as shown in the following screenshot.

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

3. Save the form and Publish the changes.

You are now able to make the changes required to your root Business Unit!

Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug

That's all for the blog today! Remember, you can get more handy tips and tricks like this one by subscribing to our blog!

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

2 comments on “Modifying the Root Business Unit: Workaround for a 2015 SP1 Bug”

  1. This is too much to change root business unit (BU) name . I did simple exporting the root BU and import the name with correct name.Your solution is over-architectured but will definitely work.

  2. Even doing an export-import is a bit overengineered in this case. The workaround instructed by Microsoft is the most simple approach: "Under entity customizations, you can adjust the "parent business" field to be business required, business recommended, or optional. If you make that change, then you are able to change the name as you please. You can also change the field back to enforce the rule again for all subsequent children business units."

PowerObjects Recommends