Requirement Escalation button on Form

VishakhaShi
Tera Contributor

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.

4 REPLIES 4

Harish_K07
Giga Guru

Hi @VishakhaShi - when you say the “Escalation tab”, do you mean the 'Escalate' UI action button?

Hi @Harish_K07 , yes thats correct.

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

Jitendra Diwak1
Kilo Sage

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

Please accept my solution if it works for and thumps up.