How can you populate the Incident Resolution Code list depending on Subcategory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2020 06:41 AM
I would like to only show a list of resolution codes specific to the subcategory selected.
Most subcategories can use the list of codes already defined.
However, there are certain subcategories where these choices make little sense, so they need their own resolution code choice list.
I would only want a particular list of choices to show up if a specific subcatetory is selected.
For example:
Category: Security
Subcategory: Phishing attack
Resolution choices: Blocked, Contained, Not Phishing-SPAM, Resolved by Caller, etc.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2020 06:49 AM
Hello Joe,
You can show or hide choices via Client Script.
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2020 10:44 AM
Pradeep,
Here's my "onChange" client script below.
This works if you are actually in the ticket and change the subcategory.
However, it does nothing if the subcategory is automatically selected when submitted.
Also, when the agent actually tries to resolve the Incident, all of the choices on here disappear.
So I tried to create an "OnSubmit" script, but it doesn't do anything at all to the choice lists.
My guess is that I actually have to create a Business Rule instead.
What do you think?
**********************************************************************
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}
//Remove Security Options from choice list
g_form.removeOption('close_code', 'Remediated');
g_form.removeOption('close_code', 'Contained');
g_form.removeOption('close_code', 'Not Phishing - SPAM');
if (g_form.getValue('subcategory') == 'Security Incident') {
//Add the resolution code options when subcategory is "Security Incident"
g_form.addOption('close_code', 'Phishing - Remediated', 'Phishing - Remediated', 1);
g_form.addOption('close_code', 'Not Phishing - SPAM', 'Not Phishing - SPAM', 2);
g_form.addOption('close_code', 'Virus - Contained', 'Virus - Contained', 3);
}
}
***********************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2020 11:07 AM
Try this:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
//Remove Security Options from choice list
g_form.removeOption('close_code', 'Remediated');
g_form.removeOption('close_code', 'Contained');
g_form.removeOption('close_code', 'Not Phishing - SPAM');
return;
}
if (g_form.getValue('subcategory') == 'Security Incident') {
//Add the resolution code options when subcategory is "Security Incident"
g_form.addOption('close_code', 'Phishing - Remediated', 'Phishing - Remediated', 1);
g_form.addOption('close_code', 'Not Phishing - SPAM', 'Not Phishing - SPAM', 2);
g_form.addOption('close_code', 'Virus - Contained', 'Virus - Contained', 3);
}
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2020 11:35 AM
This works as long as you are making changes to the Incident ticket and select the "Security Incident Subcategory".
However, as soon as you submit it, the script just evaluates the first 'if' condition as null, executes all those lines and returns. It never makes to the second 'if' condition that actually evaluates what subcategory you've just chosen.