applyTemplate() with child templates and references

Antal1
Tera Contributor

I would like to trigger creating multiple tasks with a UI action from a parent without the need to hardcode everything.

I see there is a Next Related Child Template reference on the templates (sys_template) where I can chain task after task. Creating the first task with the following script creates the task, applies the template, also creates all the chained tasks but only the first task will have the reference to the parent. So the following tasks will not be linked anywhere and are worthless like that. How should this be resolved?

var gt = new GlideRecord('rm_scrum_task');

gt.initialize();

gt.parent = current.sys_id;

gt.applyTemplate('template 01');

//gt.insert();

6 REPLIES 6

I am also seeing an issue where the next task is not being created when using Next related template and the template bar. Is this a bug or a known limitation of the template schema?


Yes, me too.