how to create SLA has breached by script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-31-2022 10:44 PM
MY requirement is in SLA using Workflow.
i am creating an sn_customerservice_task
. when ever sn_customerservice_task is created SLA should run for 24 hours.
if the SLA has breached , the notification should be sent.
i have created an code to check the task is breached , but it is not working
answer = ifScript();
var gr = new GlideRecord('task_sla');
gr.addQuery('task', sys_id);
gr.addQuery('has_breached', true);
gr.query();
function ifScript() {
if (gr.sla.type == 'sn_customerservice_task') {
return 'yes';
}
return 'no';
}
send me the updated script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-31-2022 11:19 PM
its not resolved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-02-2022 03:41 AM
Looking at all the questions you have asked around this subject, it becomes clear we forgot to ask you the most important question: what are you trying to accomplish? What are you building? What is the original (customer) requirement?
You are asking bits and pieces about relationships, workflows, etc, but combining all those questions makes me wonder if the correct approach has been taken.
If my answer helped you in any way, please then mark it as helpful.
Mark
ps And please do as Ankur asked: close all you duplicate questions and also the ones that have been answered/resolved, preferably by marking the most helpful answer as correct.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark