- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 01:18 AM
I have a requirement when SLA breached to 100% then incident should highlighted in Red color.
referred this link but not helpful : - https://www.servicenow.com/community/developer-forum/how-can-we-set-incident-number-in-to-orange-col...
how to achieve this?
Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 02:38 AM
@shweta14 Thanks - you need to make changes to your script include, since you have multiple SLA's attached and the incident should be highlighted even if one SLA exceeds the threshold.
Update the value in the style record to:
javascript: new ElapsedSLA().getSLAPercent(current) == true;
Update the script include
var EscalateSLA = Class.create();
EscalateSLA.prototype = {
initialize: function() {},
getSLAPercent: function(incRef) {
var flag = false;
var slaPercent = '';
var sysID = incRef.sys_id;
var slaGR = new GlideRecord('task_sla');
slaGR.addQuery('task', sysID);
slaGR.query();
while (slaGR.next()) {
if(slaGR.business_percentage >=90){
flag = true;
return flag;
}
}
return flag;
},
type: 'EscalateSLA'
};
If my answer has helped with your question, please mark it as correct and helpful
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 01:25 AM
Hi Shweta,
If you have followed all steps from link, then it should work. Please share the configurations you have made.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 01:34 AM
Hi Jaspal,
please check the below screenshots
script include:-

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 01:39 AM
Thanks, Can you also share Step1 configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 01:43 AM
javascript: new EscalateSLA().getSLAPercent(current) >= 90;