Requirement Escalation button on Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 01:34 AM
Is it possible for Incidents/ Service Requests to access the “Escalation tab” only after SLA clock crosses in servicenow.
Users are escalating ticket even after creation of the ticket.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:11 AM
Hi @VishakhaShi - when you say the “Escalation tab”, do you mean the 'Escalate' UI action button?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:13 AM
Hi @Harish_K07 , yes thats correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:34 AM
You need to create a script include to GlideRecord to the task_sla table and check if your corresponding SLA's 'Has Breached' is set to true. Below is a Script include function that can check for the Has Breached status. The reason I'm passing in the incident record and not using current is to make the method easier to test.
isSLAHasBreached: function(incident){
var grSla = new GlideRecord("task_sla");
grSla.addQuery("task", incident.getUniqueValue());
grSla.query();
while (grSla.next()){
if (grSla.has_breached)
return true;
}
return false;
},
Now in the UI Action condition, call your script include function - 'new nameOfYourScriptInclude().isSLAHasBreached(current).
Mark as correct and helpful if it solved your query.
Regards,
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2024 02:20 AM
Hi @VishakhaShi,
To do this, you will need to GlideRecord on sla table and there you will store the value of hasBreached field value in it then check if hasbreach==true then apply the same logic to escalate.
Please accept my resolution if it works for you and thumps up.
Thanks
Jitendra