Saturday 27 June 2015

CRM Status Reason to Control Process/Stage Flow Codeless

Introduction

In real world, we always have a status or stage for each instance, same well as if we implement in CRM record, each record can have multiple stages and you might need to control it.

Imagine, we have this stage sequence:

image

How about Business Process Flow?

Now, in CRM 2013 we also have the Business Process Flow.

image

This feature apparently is used to guide you manage a record by process one by one.

But, this does not stop you to go back and forth (yeah, only required Fields that can stop), we know that in CRM 2015 it has new special events, but, well, you still need to control it programmatically using client script event or server side behind code.

And also if you notice in the final Stage, Closing, if you want to deactivate the record you need to manipulate it using workflow or programmatically.

Status Reason Transition?

Now, let’s go to the topic itself, in CRM 2013 SP1, we have been given a feature so-called Status Reason Transition, this feature is considered cool feature and to be honest now not many people using this, since they are commonly confusing about its real usage and always thinking to link process to BPF.

So, in this post, my point is to accentuate status reason can be useful to control stages.

I try to translate the Requirement to Status Reason now.

I have these status now, which I divided into two state:

*Active

image

And

*Inactive

image

Status Reason WITHOUT Transition in the Form

Now, put it to the Form and then see the result:
image

Hm..Where is the control?

Well, by default, users can select and change the status immediately without control as they like.
Now, we need to control!

How?

Status Reason Transition Rules

Go back to the customization and go to the Entity –> Fields –> Status Reason, which you will see this button!

image

Then, let’s setup our transition eligibility rules

image

Save and Publish, then see the result

Status Reason WITH Transition in the Form

*When you are in the ‘Tender Briefing’ State

image

You can see here, you can only choose to keep remain in the ‘Tender Briefing’ or change to the ‘Requirement Gathering’

*When you are in the ‘Requirement Gathering’ stage:

image

You can only move to ‘Presentation’ and you can’t back to the first state.

And so on until you reach the final step. Here you can validate that the users so that they cannot go back to the initial stage or move forward without pass the stages, they cannot manipulate the stages and also it is good for them to control then they won’t be confused using CRM for replacing them reporting their progress.

Let’s say you have another scenario, for example from Tender Briefing you already know the Requirement and then the prospect already knew your Company Profile because your company is famous! So, to enhance and accelerate sales process you allow salesperson to skip the stages and straight forward go to Proposal or Demo.

Here we translate:
image

While we still focus to the sequence that still enable, such as from Presentation to Proposal and so on.
Now, we start again comparing this with new CRM 2015 Feature for BPF that is branching for process.

Well, we can do this branching also with Status Reason.

Back to your Status Reason Transition Setting and then do this setup:

image

Now, when you are in the Tender Briefing State, you will be facing 4 stages that you can choose.

image

State and Status Transition

One more not to know is this Status Reason Transition also allow you to validate across the State, for those who have known CRM, we knew that each CRM Record has two state, that is State (that is always Action or Inactive) and then Status Reason (that for most entities you can add or modify the available option set).

So, assuming you are in the ‘Active’ state specifically in the ‘Proposal’ then you want to close it as Won, the system won’t allow it since you want to control every single step.

image

So, using this feature you can also control the deactivate button.

However, if you want to allow them ‘Close as Lost’ you can also just add in the transition so that they can straight forward close this as Lost without processing to  many stages, save time for impossible Winning Tender.

image

Result:

image

And again..All is codeless!

Hope this helps!
Thanks.

6 comments:

  1. Hi , thank for your article, Do you know if this work in CRM 2016 ? I try but it's seem not working, maybe you can post a screen of the process workflow ?
    Thank

    ReplyDelete
  2. hello Aileen,
    kinda new to Dynamics and i came across you blog - loved it! very helpful.
    and i see your answers a lot in forums, thank you for contributing from your knowledge...

    about this specific post, it might be outdated or i'm missing something but there seems to be some differences in Dynamics between Status and Status Reasons (every entity has them) VS. Stages and Steps (available only in BPF i think), can you please elaborate a bit?
    i'm trying to figure out how to combine them (state and stages) or when to use one and not the other.

    i tried reading MS documentations on the subjects but when you read on Statuses there is no reference to stages\steps and vice versa...

    much aprriciate any help on the subject.
    Lior

    ReplyDelete
    Replies
    1. (forgot to mention: i'm on crm dynamics 2016)

      Delete
  3. Hi Lior

    Sorry for the late response.

    Yes you are right, stages and steps are related to BPF.
    Every entity has 1 status and 1 state.
    Between stages, steps, and status or state are not exactly connected each other.

    Thank you

    ReplyDelete
  4. Hi Aileen, I don't know how you did it, but even with your recomendations, I'm not able to block anyone from going back. All I'm able to do is prevent the user from selecting specific status reasons, which by itself does not prevent a user from going back and forward on the business process flow.

    Am I missing something?

    Best regards, and thanks in advance for any feedback/help you can provide,
    João Almeida.

    ReplyDelete

My Name is..