Incident template selection to be made mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 04:17 AM
Dear All,
Happy Friday!!!
Looking for some advise here.
We use both CSM and ITSM and I have a requirement to make selection of an incident template mandatory when the Incident is created from a Case.
How could I achieve this? Any guidance is appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 05:18 AM
@Santy19 You can use the following script to make the template field mandatory.
function onLoad() {
//Type appropriate comment here, and begin script below
var parent = g_form.getReference('parent', callBackFunc);
function callBackFunc(parent) {
if (parent.sys_class_name == 'sn_customerservice_case') {
g_form.setMandatory('u_template', true);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 05:59 AM
Hi @Sandeep Rajput
Template is not the custom field but out of box template.
OOB there's an UI Action i.e Create Incident. When a user on a case form click on that UI action "Create Incident" an incident is created with case details.
Now question is when we click on that UI action we want the template to be mandatory so that the fields in the incident will pre-populated according to the defined template.