- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2014 10:39 PM
I want to capture the assignment group at the time of SLA breach on task table. So I am using the below code
if (current.active) {
if (current.has_breached.getDisplayValue() == 'true') {
createMetric();
}
}
function createMetric() {
var mi = new MetricInstance(definition, current);
if (mi.metricExists())
return;
var gr = mi.getNewRecord();
gr.field_value = current.task.assignment_group;
gr.calculation_complete = true;
gr.insert();
}
But this isn't capturing any records. Plese advice me where am i doing wrong ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2014 11:16 PM
Got the solution. I added metric event for task_sla table and now its working as per my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2014 11:16 PM
Got the solution. I added metric event for task_sla table and now its working as per my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2014 09:48 AM
Thanks for sharing!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2015 07:41 AM
Hi Poul, I am very new to scripting. I understand completely what you are doing , would you possibly have an example of the script you used to accomplish this ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2014 11:06 PM
Hi Pavan
I need it for the reporting purpose. We need to create reports on a monthly basis for the tickets which has been breached(for all priorities) and which assignment group was in charge during the breach. Since I have seen scenarios where the assignment group changes after the ticket has been breached. So I want the correct assignment group who breached the ticket for business purpose.
Please help why my metric is not capturing any data.
Thanks,
Reza
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2015 07:43 AM
Hi Reza,
I am new to ServiceNow. In our previous service management system we could identify the team where the SLA breached, but it isn't possible in Service Now OOB, however I believe metrics are the answer for this. I also need to report on SLA breaches monthly per team as part of the monthly SIP process.
I do not know enough about metrics to apply it to my problem. Could you explain what you changed so that it worked or possibly post a screeshot of your metric definiton.
thank you
Charl