- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 12:40 PM
We have configuration item as a field on incident, problem, and change. The choice list is filtered to only include CIs from principal classes. We are now capturing configuration item on sc_task records and the choice list is showing all CIs. I've tried adding a dictionary override for the sc_task table, using the reference qualifier override. Looking at incident override, it uses TaskUtils script include which is an extension of TaskUtilsSNF. The OPS_FILTER_CLASSNAMES value includes only incident and problem tables as the task types used in the filter. My thought was that I needed to add sc_task to the task types. I first tried creating a new script using the same script content but with the addition of the sc_task table. I also tried setting the values in TaskUtils script to override TaskUtilsSNF. Neither way works, I still see all of our configuration item records in the choice list when selecting from a service catalog task record.
Here is the current dictionary override:
And the reference qualifier override for sc_task:
Here is my override script include in TaskUtils:
I still see over a million configuration items in the choice list where incident and change are restricted to the principal class records, around 40,000 records.
Am I missing something else that needs to be set for this to work with sc_task?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 03:00 PM
Well this is really frustrating. Just found this KBA: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0787996
It states that
"The reference qualifier of the cmdb_ci field does not work when trying to override the task table's cmdb_ci field's reference in the catalog task.
Any value placed into the reference qualifier field in the dictionary override for catalog task gets ignored."
And then it says that they have decided not to fix it. So I've basically wasted a bunch of time on something that doesn't work and apparently never will.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 12:54 PM
Hi Rita,
Open the TaskUtilsSNC script include from TaskUtils and copy the function from getConfigurationItemFilter() and override this function in TaskUtils.
This will resolve the issue.
Please mark this as helpful and correct if this helps you.
Thanks,
Yaswanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 02:02 PM
Thanks for the quick response. I copied the function from TaskUtilsSNC and pasted in the TaskUtils script include. Here is the content now:
I gave this a try, it still does not filter correctly. Since this is an override to TaskUtilsSNC I'm not sure why copying the function intact from the original script would do anything different. Let me know if I've missed something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 02:12 PM
Hi Rita,
Do not use the same function name as it might impact in other places where it is being used.
So create your own function with data you need to be passed and also replace the function name in your dictionary override.
Please mark this as helpful and correct if this helps you.
Thanks,
Yaswanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2025 02:16 PM
The other odd thing is that there is an OOTB reference qualifier override built for change that filters correctly even though the change_request table isn't listed in the OPS_FILTER_CLASSNAMES constant.