Automatic Workflows and Business Units
I know — not a very sexy title, but this can be a confusing issue, and it has plenty of applications if you need to create automatic workflows in CRM. The basic issue is this: if you have an automatic workflow that should only run for SOME users but not all users, how do you do that?
Consider the following business requirements:
Your organization will make extensive use of service cases, and will use the Case entity to track them. Most users throughout the organization will be able to create a Case record (in CRM security-speak, they will have Create privilege on the Case entity), but when a Customer Service Representative opens a Case for a customer, an automatic workflow implementing an official service level agreement will run. A user in another department can create Case records for their own purposes, but the automatic SLA workflow should not run when anybody other than a CSR opens a Case.
Using the public VPC image for Dynamics CRM 4.0, we will create two child business units (Service and Sales) underneath the root business unit (MicrosoftCRM):

We will have some users assigned to each of these business units, as you can see here:

We have a workflow that will implement our official “SLA”, which we can see in the All Workflows view here:

Notice here that the “Standard SLA” workflow is owned by Paul West. Paul is playing the role of Customer Service Manager, but the important thing is that he is assigned to the Service business unit. Since he’s in that business unit, that is also the “Owning Business Unit” of the workflow. Here’s how the properties of the Standard SLA workflow are configured:

This workflow is scoped at the “Business Unit” level, and it runs automatically, whenever a new Case record is created. So, whenever any user in the Service business unit creates a Case record, the Standard SLA workflow will fire. Whenever any user in any other business unit creates a Case record, nothing will happen.
So this is all set up to solve the business problem outlined above, but here’s the catch: only the Owner of a workflow can publish the workflow! So unless Paul West (in this example), is a very technical Customer Service Manager, somebody else is going to have to create the workflow for him. Suppose that the user creating the workflow is a System Administrator, associated with the root business unit. This is a very typical configuration in many CRM organizations. The System Administrator can create the workflow, but if he publishes it, it won’t run for customer service reps, because the administrator is in the root business unit! And if the administrtor assigns it to Paul West, the administrator can’t publish it – because, like I said, you can only publish a workflow you own!
There are a couple different approaches to this, but on the whole, I think the best one is to assign the workflow to the most senior manager (user) in the business unit you want the workflow to run automatically for, and instruct that person how to publish it. (An alternative would be to move the administrator to that business unit, but that would probably cause more problems than it would solve!)
In any case, once Paul publishes the workflow, you get the results you want. Suppose Angela creates a new case. The workflow will run automatically, as she could see by clicking the Workflows link on the Case left-navigation as you see here:

But if anybody outside the Service business unit creates a Case record, nothing happens, just as it shouldn’t. (in terms of the workflow, anyway). Again, this takes a little getting used to especially if you’re in the habit of thinking that System Administrators can “do anything”. They can’t publish somebody else’s workflow, and they can’t trigger automatic workflows owned by somebody in a different business unit, as is illustrated by the following screenshot of a Case record created by the administrator:




Brought to you by Richard Knudson and IMG.
Professional Writing Said,
May 9, 2009 @ 2:38 pm
This comment is going to sound juvenile, but thank you for adding pictures to your explantaion. Oftentimes it is difficult to try and figure this out based on the text alone, but with the pictures, you have something to follow and you’ll know whether you’re doing it right or not.
-Matt