How to stop SLA without removing setworkflow(false)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 03:52 AM
Hi Team,
We have a requirement to put on "On-Hold" state of demand records. We have return background script to update the state into on-hold.
Script:-
Var gr = new GlideRecord("dmn_demand");
gr.addEncodedQuery("sys_class_name=dmn_demand^numberINDMND.....")
gr.query();
While(gr._next()) {
gr.state = "12";
gr.u_on_hold_reason = "10";
gr.setWorkflow(false);
gr.update();
}
This above code working fine as expected. But the demand records SLA is still running.
How to stop SLA without removing the setworkflow(false);
Thanks for the advance.
Thanks,
Sai

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 04:18 AM
Hi,
setWorkflow(false) is to stop the execution of BR, meaning whatever BRs are there on that table those will not get trigger if we use setWorkflow(false).
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 04:30 AM
Hi @thaduri sai ,
You need need a script to exclusively stop SLA for the demand. This script will only stop BR and other Background activities to execute.
I hope this helps...
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....