- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Dear all,
I'm using Collaborative Work Management and would like to modify the Apply template functionality; this action just creates the list of saved tasks (of my starting template) but doesn't applies also relationships and some other fields I would need to set.
Does anybody know how to intercept this action and change it in order to add all other information?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ernesto,
Could you elaborate what kind of data you would to store/apply as a part of template.
relationships - do you mean parent/child or other fields?
We usually save any field info which is the view while creating template.
Script Includes - CWMSaveTemplateUtil, CWMApplyBoardTemplateAPI predominately take care of Saving as a template and Creating from a template respectively.
Let me know if you have more questions.
Thanks and Regards,
Sunil B N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Ernesto,
Thanks for sharing the details. There is no property or quick solution to this. You may beed to store this as additional information while saving as template in tasks JSON. and while applying use that additional information and create the relationships.. Post creation we have to 1:1 mapping b/w newly created task id vs task id the template.
Using the same data, you need to create relationships post creation of tasks in those script includes.
Thanks and regards,
Sunil B N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @E di Santo
Refer this Servicenow Documentation link:
Apply a template to existing Board or Doc in CWM
Also check : https://www.youtube.com/watch?v=nfYHU1GOnok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Tanushree,
I already checked on official documentation, I know how to apply a template, my issue is that template doesn't save also relationships between tasks, which is my need.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
For everyone, I met the requirement with some small customisations.
First of all I created a custom field on sn_cwm_task table adding an origination task field (type string, it will contain the sys_id of template originating task), then CWMApplyBoardTemplateAPI script include, here I added some code in the _applyTemplateBoardTaskRecords function in order to get relationships of template origination task and then apply the same to the new created tasks.
Thanks again to @Sunil B N for giving me some hints on scripts used by ServiceNow when applying template!
Bye
Ernesto
