- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2020 05:18 PM
Hello,
I would like to auto create a case task with certain field values (and it be auto saved), when a specific field is populated on the case. The field on the case (checkbox) will be auto checked when a specific update is automatically added to the activity stream of the case.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 12:53 PM
Add this code and check-
var lastComments = current.comments.getJournalEntry(1);
if(lastComments.indexOf('The customer called and requested a callback') > -1){
var childTask = new GlideRecord('sn_customerservice_task');
childTask.initialize();
childTask.assignment_group = "ff0370019f22120047a2d126c42e702b"; // replace the sys_id with sys_id of the group
childTask.parent = current.sys_id;
childTask.short_description = "Child Task Test";
childTask.insert();
}
I tried this on my PDI and it works:
Case:
Case Task:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2020 07:00 AM
Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 04:25 PM
Requirement has slightly changed for this. I would like to auto-create a Case Task from the Case, when a specific additional comment is made on the Case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2020 11:23 AM
Anybody have any thoughts on how this can be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2020 12:47 PM
var comm = current.comments.getJournalEntry(1);
if(comm.indexOf("test")!=-1)
{
//create case task:
var gr = new GlideRecord("sn_customerservice_task");
gr.initialize();
gr.short_description ="Case Task Created";
gr.parent=current.getUniqueValue();
gr.comments = "Case task created from case: "+current.number;
gr.insert();
}

Question: I would like to auto-create a Case Task from the Case, when a specific additional comment is made on the Case.