We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to stop running sla

ronaldanand
Tera Contributor

Hi

    How to stop my running sla. please someone guide me

5 REPLIES 5

phillipmelmoth
Mega Expert

I think this should do the trick in a background script or such



var taskSLA = new TaskSLA(/* sys_id or task_sla GlideRecord */ task_sla);


taskSLA.setUpdateTime(/* glide_date_time, GlideDateTime or string "Value" */ end_time); //Optional if you want to set the end_time to calculate from


taskSLA.updateState(TaskSLA.STATE_COMPLETED); // or TaskSLA.STATE_CANCELLED