Create Scrum Task - Analysis Task - Business Rule with Script not working

Philip Owen
Tera Contributor

Why is this script with a Business Rule not working? 

 

Scenario is that I want to create Tasks from when a story is created to prevent them manually being created. 

 

(function executeRule(current, previous /*null when async*/) {

    // Add your code here

    var gr = new GlideRecord('sn_safe_scrum_task');
    gr.Initialize();
    gr.type = '1';
    gr.short_description = "Analysis Task";
    gr.parent = current.sys_id;
    gr.insert();

})(current, previous);
 
the ge.type Discionary Entry is correct being = 1
This is to be 'inserted' 'After' so why is the task not appearing? I have the correct table as well. 
7 REPLIES 7

Philip Owen
Tera Contributor

Hey Jennifer,

I fixed it in the end with code but I had to change the view to see the output. Is there any code to add that I can apply where I will see the output in default view?

If you want to see the related list of tasks in the default view, do the steps I outlined above:

 

Open the record where you want to add the related list. From the hamburger menu, click Configure -> Related Lists. Make sure the view shows "Default" and add your related list wherever you want it to appear. Click Save to save your changes.

Philip Owen
Tera Contributor

Yep go that thank you 😎