Answered by:
CRM 2011 - Report on Case assignment

Question
-
Hi
Is there any way to create a report on the case assignment details.
Eg.,
Case1 assigned to A on 01/01/2012 - 5 days aging
Case1 assigned from A to B on 01/06/2012 - 1 day aging
Case1 resolved by B.
Any help is appreciated. Thanks!
- Moved by Andrii ButenkoMVP, Moderator Tuesday, September 11, 2012 8:25 PM (From:CRM)
Tuesday, September 11, 2012 7:48 PM
Answers
-
I agree with Andrii, a custom entity (perhaps "Assignment") with a relationship to the Case would suit this perfect. This avoids any custom SQL work, directly against the database. Then it would be a simple matter of creating a plugin to generate an instance of the assignment, recording the changes made.
If you register the plugin against the "assign" event, pre operation, you could use a property of the plugin execution context to determin the systemUser the record is being assigned to like so..
SecurityPrincipal assignee = (SecurityPrincipal) context.InputParameters.Properties["Assignee"];
The SystemUser guid will then be
assignee.PrincipalId; //Assuming you're not assigning to a queue!
Then, as the plugin is registered in the pre operation stage, you can get the original system user from the originating case itself, allowing you to create the new entity with those fields completed.
Hope this Helps.
- Marked as answer by DhivyaSiva Wednesday, September 12, 2012 1:22 PM
Tuesday, September 11, 2012 10:37 PM -
Yes,
It is possible to parse those audit information. I wrote article about it - http://a33ik.blogspot.com/2011/11/crm-2011-reports-on-data-auditing.html
- Marked as answer by DhivyaSiva Wednesday, September 12, 2012 1:54 PM
Wednesday, September 12, 2012 1:28 PMModerator
All replies
-
Hello,
Of course you can get this information from audit table but from my point of view it is better to create custom audit entity and store information regarding reassigning of case inside it.
- Proposed as answer by MubasherSharif Wednesday, September 12, 2012 8:03 AM
Tuesday, September 11, 2012 8:24 PMModerator -
I agree with Andrii, a custom entity (perhaps "Assignment") with a relationship to the Case would suit this perfect. This avoids any custom SQL work, directly against the database. Then it would be a simple matter of creating a plugin to generate an instance of the assignment, recording the changes made.
If you register the plugin against the "assign" event, pre operation, you could use a property of the plugin execution context to determin the systemUser the record is being assigned to like so..
SecurityPrincipal assignee = (SecurityPrincipal) context.InputParameters.Properties["Assignee"];
The SystemUser guid will then be
assignee.PrincipalId; //Assuming you're not assigning to a queue!
Then, as the plugin is registered in the pre operation stage, you can get the original system user from the originating case itself, allowing you to create the new entity with those fields completed.
Hope this Helps.
- Marked as answer by DhivyaSiva Wednesday, September 12, 2012 1:22 PM
Tuesday, September 11, 2012 10:37 PM -
Thanks so much. I will try this. I think this can also be acheived through workflow... instead of a plug-in.
But just curious, Is there any way to parse the Audit table to get this info? I noticed the changed values in the Audit table are stored as -- '123~1234~dfsdf' which would be very difficult to manipulate. Microsoft should come up with a better way to store Audit logs...
Dhivya Sivasankkar
Wednesday, September 12, 2012 1:26 PM -
Yes,
It is possible to parse those audit information. I wrote article about it - http://a33ik.blogspot.com/2011/11/crm-2011-reports-on-data-auditing.html
- Marked as answer by DhivyaSiva Wednesday, September 12, 2012 1:54 PM
Wednesday, September 12, 2012 1:28 PMModerator -
Thanks Andrii. I will defenitely try this out. Appreciate it!
Dhivya Sivasankkar
Wednesday, September 12, 2012 1:43 PM -
Thanks Andrii. I will defenitely try this out. Appreciate it!
So may be my answers should be marked as answer in case my reply answers your question?
Dhivya Sivasankkar
Wednesday, September 12, 2012 1:50 PMModerator -
I'm getting an error while executing the query
Invalid length parameter passed to the LEFT or SUBSTRING function.
Any help is appreciated.
Dhivya Sivasankkar
Wednesday, September 12, 2012 1:56 PM -
No problem, glad it helped. I also considered a workflow, but as they run after the change has been made, I couldn't think of a quick way to get the value of the previous owner of the record (without introducing hidden fields, and separate events, which isn't great from an architecture point of view)
Cheers
Wednesday, September 12, 2012 9:32 PM -
Hi,
Is it possible to find out the current owner and the previous owner of a case through plugin?
Thanks.
Dhivya Sivasankkar
Thursday, October 11, 2012 2:42 PM