{Useful to know}– Moving User’s Business Units in Dynamics CRM? Beware of all the side effects

We had this requirement recently with one of our clients. They had a change in their business processes and from team based security, they wanted to move to region based security.

What they wanted from us is to migrate their Users to specific Business Units based on regions. So they had five region which they set-up as Business Units. And they had around 600+ users who needs to be put under the respective business units (regions).

So we quick developed a data migration utility to do the job for us. The data migration utility would basically read from an excel file the user and their regions and then move the user in CRM to the appropriate business unit. When the business unit changes, we all know the security roles gets lost. So the utility also took care of the fact that it re-assigns the security roles to the user after the business unit of the user has changed.

So far so good. After data migration happened everything worked great. We verified the roles and business unit of the user and everything was fine.

However to our horror, the business of the customer complained that they were getting emails from CRM which they were not supposed to. And hence I was there again trying to find out what is causing the issue.

After rounds of debugging we found that there is a specific functionality in which email is triggered to the manager of an employee. The manager was set-up in CRM using the OOB Manager field. So what really triggered the wrong emails?

Well if you change the business unit of a user in CRM, the following are the effects on the manager field.

If the manager is in a business unit which is neither the same nor the parent business unit of the user, the manager of the user would be automatically changed to someone above the hierarchy.  For example – Say the following is the business unit structure.

image

And say we have three users (user1, user2 and user3).  Say before migration this was the org structure.

  • User1 belongs to BU1
  • User2 belongs to BU2
  • User3 belongs to BU2
  • User2 is the manager of User3

Now as per the data provided by the customers, both User2 and User3 should be in the same new BU. say in our example it is BU4.

The problem that happened is the order in which the users got migrated. So User2 (manager of user3) was first in the list. So when we migrated User2 to BU4, the manager now belongs to BU which is in the lower hierarchy than the reportee’s BU.

So what CRM did is, it re-assigned the manager of the User3 to User1 (belonging to BU1) automatically behind the scenes.

And this totally resulted in multiple wrong manager set-up and hence the wrong emails.

So if you have a requirement where you are needed to change the BU of the users, please do remember the effect on the manager field also. Also luckily we did not have manager hierarchy enabled for our customer. If manager hierarchy would have been enabled, this kind of wrong manager set-up would result in security breach as well.

Hope this helps!


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

3 thoughts on “{Useful to know}– Moving User’s Business Units in Dynamics CRM? Beware of all the side effects”

  1. Insightful Indeed, thanks for Sharing.
    Though, I stumbled upon your article pondering about a different thing. I am sharing it with an intention of reaching out to a wider audience.
    I have a conviction that while changing users business unit, their default forms are also changed. I don’t have substantial grounds to prove it as it is intermittent.
    I would be interested to know if any one has come across this.
    NB: I am subscribed to the comments via email.

    1. Hi Avik,
      Thanks.
      Not sure if I observed this behavior. Let me try this. Will keep you posted. I presume by default forms, you refer to configuration of forms based on security roles.
      -Debajit

  2. Yes quite near, I meant the forms being reverted to the entity default form. For example, if an entity had 3 forms say Info, Contact, Target ,form “Info” defaulted to Will.
    After changing the business unit Form “Target” became the default form for Will.
    Bit weird!

Comments are closed.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading