Normally when people think of tracking activities in CRM, they think of tracking activities that happen outside of CRM (i.e. phone calls, emails, tasks, etc.). However, what if you wanted to track activities that happen inside CRM (i.e. the time spent looking at a particular record). Why would you want to do this? Well, perhaps you are trying to better gauge how profitable a client is. If you can track how much time is spent working on each record related to a client and compare it to the revenue generated by that client, you can easily see how profitable the client is.
How would you do this? The basic premise is actually very simple. Some script gets injected into the forms you want to track. When the form is first opened, the an activity is created and the timer is started. When the form is closed, the activity is marked as complete and the timer is stopped. Voilà! The real-time activity is tracked.
This solution seems pretty simple, right? That's because it is. Perhaps it's too simple though. What happens if the user walks away from their computer while a form is open. What happens if the user opens a form but then switches tabs? What if they open multiple forms at the same time? These scenarios may be handled differently per organization.
If you are interested in using the basic version describe above (or extending it), you can find the source code and unmanaged solution file here. Note: this solution was built in CRM 2016 and will in both the online and on-premises versions.
To install the solution, simply import the solution file into your organization. You will then need to register the libraries and On Load function to each form that you would like to track activity on.
One this is done, publish your customizations. Now, if you open a record and close it, you will find a new "Activity Tracking" activity in the system!
You can download the script from the downloads section of our site or click here: