- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 06:34 AM
Hi All,
Thanks for checking into my query , much appreciated.
We have a requirement:
When fulfiller resolves an incident, resolution code 'Duplicate incident' should only be selected if there is a parent incident for such incident
please help with best possible option for the ask or script for reference on the same.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:09 AM - edited 02-22-2024 07:10 AM
Hello
This requirement can be accomplished with an onChange Client Script for the parent field of the incident table.
The following code should work as expected.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if(!g_form.getValue('parent')){
g_form.removeOption("close_code", "Duplicate");
}else{
g_form.addOption("close_code", "Duplicate", "Duplicate", 1);
}
//Type appropriate comment here, and begin script below
}
Please let me know if you have any additional questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:09 AM - edited 02-22-2024 07:10 AM
Hello
This requirement can be accomplished with an onChange Client Script for the parent field of the incident table.
The following code should work as expected.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if(!g_form.getValue('parent')){
g_form.removeOption("close_code", "Duplicate");
}else{
g_form.addOption("close_code", "Duplicate", "Duplicate", 1);
}
//Type appropriate comment here, and begin script below
}
Please let me know if you have any additional questions.