Usage of the Template (sys_template) table and the Template Value field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 08:49 AM
Hello,
We have a requirement in our project where we need to store task templates in a table. I think there are few ways to do it:
1) Create a table by extending the Template table and create records in that table to store the task templates
2) Create a table and reference the Template table. In this case we need to maintain records in 2 tables
3) Create a table with custom Template Value field, but template value field is not visible when creating a new field.
I want to know what is the best practice for doing this, should we extend the template table or can we create a custom field with template_value type by overriding the "visible" attribute in the field classes table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 10:20 AM
instead of starting a discussion about possible solutions, you should better explain the underlying requirement and why do you think the template concept in ServiceNow is not sufficient for your case. Then we can think about the best solution.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 11:36 PM
Hi @Maik Skoddow ,
Basically, we have a flow that creates some tasks for on-boarding request, these tasks should be different for each department. So, instead of hardcoding all the tasks in flow we have decided to create a decision table and return all the matching answers from this "Task Template" table based on the employee's department. Flow will just have to call the decision table and loop through the returned answers to create tasks.