Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Using a Custom Entity to Track Status Changes in CRM 2011

Post Author: Joe D365 |

Dear JoeCRM,

I want to track the different phases/statuses of an opportunity, and I also need to be able to report on those changes. The auditing feature is very useful for many things, but it can't be easily displayed in an advanced find or a dashboard.

Have any suggestions to track status changes in CRM 2011?

Status Auditor

Dear Status Auditor,

I have very simple solution for you. With a custom entity and a workflow, you will have your reporting capabilities and advanced find with a snap of your finger!

Since you mentioned opportunities above, we will focus on that entity and the status reason field.

1. First, we need to build a new custom entity to store these values. Within this custom entity, we will create a couple of fields that will give use some further query capabilities, in addition to using some of the out of the box fields such as owner and created on date fields.

  1. We will use the primary field to store the status
  2. A lookup to the Opportunity Entity
  3. A lookup to the Account Entity

2. Now that we have the relationship between the Opportunity and this custom entity, we can now build a workflow to create these records.

3. When setting up the workflow, we are going to check off three things: the "As an on demand process" (which allows us to run the workflow on existing records), when the "record is created," and when the "record field changes" (select status reason).

create workflow to track status changes in CRM 2011

4. Now we will create a step. We will create a new record in the custom entity we built in step 1. We can set the Opportunity, Account, Status and the owner (modified by field) from the Opportunity record.

Using a Custom Entity to Track Status Changes in CRM 2011

5. With this workflow activated, the records will be created automatically for us as the record statuses change.

Now when we review this custom entity, we can see what the status reason was changed to, the person who changed the value, and when it was changed. With this data, you can create reports and advanced finds. You also will have the capability to review the status changes by selecting the custom entity in the left navigation of the Opportunity.

Using a Custom Entity to Track Status Changes in CRM 2011

Using a Custom Entity to Track Status Changes in CRM 2011

So there you go! This just one of the many examples of using custom entities to store additional information in CRM.

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

7 comments on “Using a Custom Entity to Track Status Changes in CRM 2011”

  1. Hi, this is also what I need. I'm new to CRM, so I'm not quite sure about:
    We will use the primary field to store the status
    A lookup to the Opportunity Entity
    A lookup to the Account Entity
    Is it to add new fields in Customize Entry->Opportunities->Forms? How can I do that?
    And there is not 'Created On' for Opportunities in our system, do I have to add one as well? Or it is hidden somewhere?
    Thank you so much:)

  2. Joe, so I did this, and you can update field pulling the data from New Value, what the field was changed to. Is there a way to capture the "old value" of the field, that is what it was changed from?? Was hoping to get Audit report that captures it but cannot do anything easily in CDM 2013 Online that we have.

  3. I realise this is an old thread but I just implemented the solution and it works great for new updates. As per the other comments though, is there any way to 'back fill' from the audit history? This would be very helpful.

    1. Hi Peter - There actualy is, but takes a bit of custom code. The audit table is really hard to work wtih, but doable. I'd approach this by using the kigswaysoft ssis adapter which allogs you to read from the audit tables. Then with the ssis package, create the audit entity, so will be a bit of work in ssis, but no heavy duty programming if we use this ssis crm adapter:
      http://www.kingswaysoft.com/products/ssis-integration-toolkit-for-microsoft-dynamics-crm/help-manual

  4. Can some body please advise me how to do this for Leads ? ALso the image for point 4 is really blurred, can you please upload a more visible one? Thanks

    1. THanks. We'll fix the screen shot in point 4. IN regards to doing this to leads, yep we can do the same. For example, if you want to track lead status changes, then create a 'lead status change' entity and use same format/logic as above.

  5. This is great but would be really helpful if you fix the screen shot in point 4, very blurred and hard to follow.
    Also where can I find the detail steps to your points in Step 1?
    I am trying to make a field "Reason to Recycle" mandatory/business required when user tries to change the status reason of the lead from Active to Passive.
    Will this help me in creating a workflow for that?

PowerObjects Recommends