A while ago I was looking to switch the lay out of the account and contact form, without having to depend heavily on business rules, based on which user was opening the form. In my case a customer was using one CRM organization for multiple offices in different countries (Belgium, Spain, Italy) which worked independent from each other and use an entirely different language.
During my search I came upon some Dynamics Community forum posts, anno 2015, from Adam Vero. Several solutions were proposed in the original post, which was called “Business Unit Based Forms“, hence the name of this post. Some of them used code, but I prefer a no-code approach, which is the same approach Adam Vero took. He vaguely outlined a very elegant solution to my problem.
In this post I will built upon his ideas and give you a nice 5-step guide on how you can do it yourself.
Step 1: create security roles with no privileges in the root BU
As you cannot assign roles to forms if the roles are not in the root BU, you must create them in the root BU. These might have names such as “Access to Account form: Finance” or “Form access role: Contact Marketing form”.
Assign the relevant security role(s) to the default team of each business unit, so by definition the role is associated with all the users who are in the BU, since they are automatically in the default team. So the Marketing default team in the Marketing BU might have several roles so that Marketing people see different forms for Lead, Contact and Account than other users. In my case I created 3 roles, one for each country.
Step 2: Create different forms and enable Security roles
Open each form, click on Enable Security Roles in the ribbon. Or on a list of forms, select one and click Enable Security Roles.
In my case, I created a custom form for each country, which its own lay out and custom fields.
Step 3: Assign the newly created security roles to the appropriate forms.
Select the roles that should be able to use this form. So you might have one form for Account that is shared by Sales and Marketing (so assign both roles), but for Lead you might have one form for Marketing and one for Sales (so assign one role to each form).
In my case, one form equals one appropriate custom role which in turn equals one team and thus one set of users.
Step 4: Set up a “fallback form”
You do need to have a form that is configured for “fallback” – if a user has no roles associated with any specific form, this is the form they will see (instead of an error).
From your list of forms for an entity, click Form Order > Main form set. In the dialog box that appears, select a form and click “enable for fallback”. Usually choose a form that is the most generic and all-purpose. In my case, I picked the default “Account” form to be the fallback form.
Step 5: Get your form order right
Getting your form order right is the last challenge, but if these are all mutually exclusive, this is usually easier.
You might have to fiddle around a bit with the form order, but you’ll eventually end it with the result you want.
And there you have it, a nice and elegant no-code solution which is very easy to set up and very easy to use in a Dynamics CRM environment which consists of different business units with different needs.