Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to cancel custom task SLA using fix script

Kiruthika J
Tera Contributor

Hi All,

How to cancel custom Task SLA, I have Imported OOB SLA definition and made custom SLA active false.

Note: both OOB and custom SLA are running on the same Workflow.

Table: incident

Thanks!

1 REPLY 1

Musab Rasheed
Kilo Patron

Hi,

Please take this sample script and modify accordingly.

var gr = new GlideRecord('task_sla');
gr.addQuery('task' , 'STARTSWITH', 'INC');
gr.addQuery('stage', 'inprogress');
gr.query()
while(gr.next())
{
gr.stage = 'completed';
gr.setWorkflow(false);
gr.update();
}
Please hit like and mark my response as correct if that helps
Regards,
Musab