Hiding Business Process Flow on a Form

Dynamics CRM 2013 Forms are packed with great features- like the Business Process Flow. While most users and organizations get great value out of them, there may be instances where they aren’t needed or wanted on the form.

This week I was asked to write a bit of code to “hide” the Business Process Flow bar on an opportunity. My first thought, “Cool. Since we can have BPFs on custom entities, this bit of code can work on other entities.” Then I came back to reality.

Why don’t we just control it with Security?

In Microsoft Dynamics CRM we can control quite a few things with Security. We have the ability to display certain forms to certain security roles, fields, command bar items, commands, and Business Process Flows.

This function will allow us to have Business Processes for different teams within the organization. Here’s how to accomplish this and a few screen shots.

Create or modify the selected Business Process Flow, click Enable Security Roles.

Hide Business Process Flow 1

Select “Enable only for the selected security roles”

Hide Business Process Flow 2

 

I created a new security role for this example, “New BPF view”. It’s a security role without any privileges.

Click “Ok.” Save the BPF for good measure.   And you’re all set. Make sure you have assigned the BPF security role to the user or team that is to follow the BPF.

Hide Business Process Flow 3

Remember, the New BPF view role contains no privileges. The Sales Manager security role or another role with privileges must be added in this scenario.

When an opportunity is opened with the Security Role:

Hide Business Process Flow 4

Now we remove the BPF View Security Role:

Hide Business Process Flow 5

Open another Opportunity:

Hide Business Process Flow 6

The BPF does not display.

So there you have it. Unfortunately (or fortunately depending on who is asked) there is no code involved to remove the Business Process Flow from your forms!