- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2023 12:19 AM - edited ‎10-26-2023 02:00 AM
I am using this article to create an HR Task Template for Checklist and creating an HR Service where the Fulfillment Type is Service Activity.
https://www.servicenow.com/community/hrsd-forum/checklist-for-hr-task/m-p/1286127#M1447
However, the task generated from it does not show the checklist.
By the way, this HR Task is generated through Flow Designer.
Can someone please help me with this?
Solved! Go to Solution.
- Labels:
-
Human Resources Service Delivery

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2023 10:54 PM
@honamiUeo applyTemplate() function can be used in the flow script for applying the template https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727178

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 02:30 AM
@honamiUeo Unfortunately, this function is only allowed in Global scope either you need to create your flow in Global Scope or create a Script include in Global scope put the logic in there and call that script include in your custom action in flow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2023 10:54 PM
@honamiUeo applyTemplate() function can be used in the flow script for applying the template https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727178
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2023 11:36 PM
Thanks for letting me know!
Very useful information.
However, I could not figure out how to implement it from the documentation.
If possible, could you please instruct me how to use applyTemplate() with screenshots, etc.?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2023 11:43 PM
@honamiUeo You can build a custom action with script step and use the following code to generate the HRTask.
var rec1 = new GlideRecord("sn_hr_core_task");
rec1.initialize();
rec1.applyTemplate("my_HR_Task_template"); //replzce with your template name
rec1.insert();
Use this custom action inside your flow. Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 12:46 AM
Thank you very much!
Just ran the code and it returned the following error
Error: Function applyTemplate is not allowed in scope sn_hr_core
Sorry for asking so many questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2023 02:30 AM
@honamiUeo Unfortunately, this function is only allowed in Global scope either you need to create your flow in Global Scope or create a Script include in Global scope put the logic in there and call that script include in your custom action in flow.