Question Status

Suggested Answer
scopecrm asked a question on 26 Sep 2013 4:05 AM

How to calculate Average time for an incident from open date to closed date ??

Reply
Suggested Answer
Prashant Shukla responded on 13 Oct 2013 5:20 AM

Hi There,

Please refer the following URLs:

mileyja.blogspot.in/.../calculate-time-incident-took-to-resolve.html

community.dynamics.com/.../calculate-the-time-an-incident-took-to-resolve-in-microsoft-dynamics-crm-2011-using-net-or-jscript.aspx

CRM-tude

Prashant Shukla

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Karthik Srinivasan responded on 13 Oct 2013 1:32 PM

Ideally, this must be accomplished via SSRS reports or plugins and not through workflows or Jscript.

Best Approach

If you calculate the amount of time it took to resolve a case through plugins, you can update the field on the case form on the PreSetState Message. There wouldn't be a considerable performance hit. Your report or the Saved query would then show up the necessary values on the field.

Next Bext Approach

 Using SSRS Report. If you want to avoid writing a server side code, then the next best approach would be to calculate the time on the SSRS Report, provided you use this as a pure reporting function.

 Last Resort

Using JScript. But, if you have a workflow or a custom code to close the case automatically, or a data import function, then JScript wouldn't work for you.

Reply
Suggested Answer
Chetan Waghmare responded on 1 Nov 2013 12:49 PM

Plugins will be the best approach to calculate Average time for an incident from open date to closed date .

Thanks,

Chetan W

 

Reply
Prashant Shukla responded on 26 Sep 2013 4:58 AM

Hi There,

Please refer the following URLs:

mileyja.blogspot.in/.../calculate-time-incident-took-to-resolve.html

https://community.dynamics.com/crm/b/mileyja/archive/2012/01/26/calculate-the-time-an-incident-took-to-resolve-in-microsoft-dynamics-crm-2011-using-net-or-jscript.aspx

CRM-tude

Prashant Shukla

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Prashant Shukla responded on 13 Oct 2013 5:20 AM

Hi There,

Please refer the following URLs:

mileyja.blogspot.in/.../calculate-time-incident-took-to-resolve.html

community.dynamics.com/.../calculate-the-time-an-incident-took-to-resolve-in-microsoft-dynamics-crm-2011-using-net-or-jscript.aspx

CRM-tude

Prashant Shukla

Make sure to Vote as Helpful and  Mark As Answer ,if you get answer of your question.

Reply
Suggested Answer
Karthik Srinivasan responded on 13 Oct 2013 1:32 PM

Ideally, this must be accomplished via SSRS reports or plugins and not through workflows or Jscript.

Best Approach

If you calculate the amount of time it took to resolve a case through plugins, you can update the field on the case form on the PreSetState Message. There wouldn't be a considerable performance hit. Your report or the Saved query would then show up the necessary values on the field.

Next Bext Approach

 Using SSRS Report. If you want to avoid writing a server side code, then the next best approach would be to calculate the time on the SSRS Report, provided you use this as a pure reporting function.

 Last Resort

Using JScript. But, if you have a workflow or a custom code to close the case automatically, or a data import function, then JScript wouldn't work for you.

Reply
Suggested Answer
Chetan Waghmare responded on 1 Nov 2013 12:49 PM

Plugins will be the best approach to calculate Average time for an incident from open date to closed date .

Thanks,

Chetan W

 

Reply
Priyadarshi Purwar responded on 3 Nov 2013 3:06 AM

I am never understand the use of case resolution ?

You can also bypass the case resolution step. If you click on resolve button case should be resolved (case resolution automatically create).  and in report u can easy calculate the average date(case regulation date- case create case). for bypass need to update C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\CS\cases \cases.js file and update function

function resolve()

{

var xml = "<incidentresolution>";

xml += "<timespent>" + 0 + "</timespent>";

xml += "<description>" + "Ticket Resolved" + "</description>";

xml += "<subject>" + "Ticket Resolved" + "</subject>";

xml += "<incidentid>" + crmFormSubmit.crmFormSubmitId.value + "</incidentid>";

xml += "</incidentresolution>";

var oResult = new Object();

oResult.ActivityXml = xml;

oResult.StatusCode = 5;

/*

var url="/CS/cases/dlg_closecase.aspx";

url+="?pId="+CrmEncodeDecode.CrmUrlEncode(crmFormSubmit.crmFormSubmitId.value);

url+="&pType="+CrmEncodeDecode.CrmUrlEncode(crmFormSubmit.crmFormSubmitObjectType.value);

var ret_val=openStdDlg(Mscrm.CrmUri.create(url),document,400,365);

*/

//if(ret_val)

// {

 crmForm.name.defaultValue="";

 var oActivityXml = createHiddenInput("crActivityXml",oResult.ActivityXml);

 var oStatusCode  = createHiddenInput("crNewStatus",   oResult.StatusCode);

 //var oActivityXml=createHiddenInput("crActivityXml",ret_val.ActivityXml),oStatusCode=createHiddenInput("crNewStatus",ret_val.StatusCode);

  // var oActivityXml=createHiddenInput("crActivityXml",oResult.ActivityXml)),oStatusCode=createHiddenInput("crNewStatus",oResult.StatusCode);

 if(!crmForm.SubmitCrmForm(FormEventId_Deactivate,true,true,false))

 {

  deleteInput(oActivityXml);

  deleteInput(oStatusCode)

 }

//}

}

function reactivate(obj_type)

{var ret_val=openStdDlg(Mscrm.CrmUri.create("/CS/cases/dlg_reactivate.aspx"),null,400,200);

ret_val&&crmForm.SubmitCrmForm(FormEventId_Reactivate,true,true,false)

}

function cancel()

{

var ret_val=openStdDlg(Mscrm.CrmUri.create("/CS/cases/dlg_cancel.aspx"),null,400,200);if(ret_val){var oStatusCode=createHiddenInput("ccNewStatus",ret_val.StatusCode);!crmForm.SubmitCrmForm(FormEventId_IncidentCancel,true,true,false)&&deleteInput(oStatusCode)

}

}

Reply