Status vs. Status Reason

Status vs. Status Reason

I am often asked to explain the difference between the Status Field and the Status Reason Field in Microsoft Dynamics CRM 2011. In this article we will examine how the two fields are connected and hopefully provide some ideas you can employ to use them more effectively.

If you were to look at the Main Form on a newly created entity before making any changes it would look something like this:


 

5 things you should know about the Status Field

  1. System Generated
  2. Required
  3. Cannot be customized
  4. Only Two Options (Active or Inactive)
  5. It is changed only by system workflow, user defined workflow, or custom code

5 things you should know about the Status Reason Field

  1. It is also System Generated
  2. It is tied to the Status Field
  3. It can be changed – new Options can be added
  4. Default Options are also Active or Inactive
  5. If you read it literally it tells you exactly what it is . . . .

 

The Status Reason field is the reason that a record is in a particular status, and you get to define that. So say for instance you are working with a custom entity called "Employee". The Status for this entity will always be Active or Inactive – that is why the views that are automatically generated when you create a new entity are "Active {new entity name here}" and "Inactive {new entity name here}". So when the Employee is Active, what are some things that might provide important information about their reason for being Active?

  • Active
  • Pending Start Date
  • On Vacation
  • Maternity/Paternity Leave

 

And if they are Inactive some appropriate options might be:

  • Terminated
  • Laid Off (Eligible for Re-hire)
  • Laid Off (Ineligible for Re-hire)
  • Quit
  • Deceased

To bring it all the way home, now imagine you have hundreds of employees and you want to know who is on Vacation, on Paternity Leave, or waiting for their Start Date? What could you do if you wanted to see if you had an Inactive PM who was eligible for Re-hire? These answers and more would be a few keystrokes away.

So now that you know how they work together setting them up is easy. Navigate to the entity, open the Main Form and drag the Status Reason field onto the form. Display the properties for the field, click on the Details Tab and click the Edit button. Here is what you should see:


With Status (Active) selected click on Add and enter all of the reasons a record might be active (Pending, Maternity . . . ) then Change the Status to Inactive and add those reasons (Terminated, Quit . . . ) and you are done! Most people will change the Display name for Status Reason to something else because it can be confusing, I can also be confusing if you use the word Status since that word has a different meaning elsewhere on the form. Try something like Active Status and you should be fine.

So there you have it, if you are interested in learning how to write a workflow that changes the Status from Active to Inactive based on a selection you make in the Status Reason Option Set just leave me a comment.


Microsoft Dynamics CRM Blog