How to add default filter on "affected CI's" related list on "Incident" form (on the basis of Class)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 10:20 AM
Hello all ,
I want to add default filter on "affected CI's" related list on "Incident" form (on the basis of Class). I mean few classes not required when anybody clicks on "Add" button.I have tried changing default filter but that's not working. Can anyone help here?
Labels:
- Labels:
-
Incident Management
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 10:26 AM
Please find the solution to add a default filter to the "Add" button of Affected CIs related list.
You can do the same for including only particular classes in script include function.
- Go on the script include "AssociateCIToTask"
- Add the encoded query needed (could be dynamic)
- Omit the edit button (the affected CI could be removed from the related list)
Customization :
Script Include : AssociateCIToTask
var url = new GlideURL("task_add_affected_cis.do");
url.set("sysparm_crSysId", chgReqId);
url.set("sysparm_view", "associate_ci");
url.set("sysparm_add_to", addToTable);
url.set("sysparm_stack", "no");
url.set("sysparm_table", latestClassAdded);
url.set("sysparm_parent_class", parentClass);
url.set("sysparm_query",'nameISNOTEMPTY'); // Add default filter - Name IS NOT Empty; could be dynamic like list of class names
return url;
Regards,
Sachin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 11:01 AM
Thanks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 11:26 AM
Hello