Workflow that auto generates subtasks when a task is created

jherrell
Giga Contributor

Hello,

I need some functionality setup where

 - When I create a Task, subtasks auto Generate and have the parent set to the original task.

 - I also need this task to generate an incident and set the task as the parent.

I can get the Subtasks and incidents to generate however, they are not assigning the parent as the Task.  

I am currently trying to accomplish this task via workflow.  is there a better way to accomplish this?

 

Please let me know if any more information is needed.  

1 ACCEPTED SOLUTION

Munender Singh
Mega Sage

Hi,

Please use this script to write a BR on task

var gr = new GlideRecord("incident");

gr.initialise();

gr.short_description = "your short descp";

gr.state = "1";

gr.parent = current.sys_id;

gr.insert();

 

Regards,

Munender

View solution in original post

3 REPLIES 3

Munender Singh
Mega Sage

Hi,

Please use this script to write a BR on task

var gr = new GlideRecord("incident");

gr.initialise();

gr.short_description = "your short descp";

gr.state = "1";

gr.parent = current.sys_id;

gr.insert();

 

Regards,

Munender

I can't seem to get the Assignment Group to assign through this method.  Any Suggestions?

actually I got it.  Thanks for the help.  This was perfect.