How to apply next related template

imbrozsingh
Tera Contributor

I have a template for sc_task table and in "Next related template" field I have added another template which is also for sc_task. Now when I apply template using GlideTemplate.apply() or GlideTemplate.get(), only 1 record is being created.

Is this OOTB? 

4 REPLIES 4

Ankur Bawiskar
Tera Patron

@imbrozsingh 

which field is that? where is that present?

share screenshots

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

imbrozsingh_0-1767702841657.png

here is the screenshot.

Next related template not works, but if I add a template in "Next related Child template", it 2 task records, first "Add user to Group" and second is "Privilege Access" whose parent is "Add user to Group".

 

I don't want parent-child task, I want two tasks which are created one after another, so I have added in "Next related template" not in "Next related child template"

Dr Atul G- LNG
Tera Patron

Hi @imbrozsingh 

As per the platform, a template creates only one record at a given point in time. To create another record, you need to use the template again. So, after clicking New, this is expected behavior.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

I am doing something like this but a little different: Create templates for related task records

What i want is when template is applied next related template is also applied and record should be created which is not happening.

If you see article, the example is as: Template -> Next related child template -> Next related template.

What i want is Template -> Next related Template. In my case I dont have this child relation ship, I just