Two Duplicate SLA defintions on a single catalog task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2026 06:38 AM
Hello Community,
I have configured a SLA condition rule for a SLA definition on the sc_task table. I configured the attach() function and it started the SLA task on sc_task record. But it is having duplicates of the same SLA Definitions on the sc_task record. They are created 2 seconds apart. Any help will be greatly appreciated.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2026 06:52 AM
Hi @shahiedsali ,
Wrap it so it only fires if there isn't already an active (or any) task_sla for that definition on that task and never call attach() unconditionally. Please check the below example :
(function() {
var slaDefSysId = 'PUT_YOUR_SLA_DEFINITION_SYS_ID_HERE';
var gr = new GlideRecord('task_sla');
gr.addQuery('task', current.sys_id);
gr.addQuery('sla', slaDefSysId);
gr.query();
if (!gr.hasNext()) {
attach();
}
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2026 06:59 AM
Hi @shahiedsali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2026 07:44 AM
Hi @shahiedsali
- Use distinct conditions (Like assignment group etc) for each definition. Verify that "Allow Multiple" is unchecked if you only want one instance of a specific definition on a task
Add current.setWorkflow(false); in your custom Business Rule or script prior to updating the sc_task record. This prevents the standard "Run SLAs" Business Rule from simultaneously firing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2026 01:37 PM