hide the ui action if the sla associated with that ticket is breached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 09:43 AM
hide the ui action if the sla associated with that ticket is breached how can i do with script include or any other to hide that ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 09:22 PM
Hello @SanjayYogi18_ ,
In the UI action set Condition using script include where we can check the associated sla for the incidents has breached or not
Condition: new slabreach().slabreached(current.sys_id)
Script include name: slabreach
Function: slabreached
slabreached: function(sysid)
{
var answer = true;
var tasksla = new GlideRecord('task_sla');
tasksla.addQuery('task',sysid);
tasksla.addQuery('has_breached',true);
tasksla.query();
if(tasksla.next())
{
answer = false;
}
return answer
},