Show only Configuration Item whose class is marked as Principal CI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
The requirement is to show only Configuration Item on task table whose class is marked as Principal CI.
I used advanced reference qualifier and its script as below.
(function() {
var classList = [];
var gr = new GlideRecord('cmdb_class_info');
gr.addQuery('principal_class', true);
gr.query();
while (gr.next()) {
classList.push(gr.name.toString());
}
return 'sys_class_nameIN' + classList.join(',');
})();
This script worked in PDI, but not working in actual environment.
Is there any other possible way?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sntech
we already have an OOTB script include and function to filter CIs by principal CI classes. You can use it instead of writing a custom script.
javascript:new TaskUtils().getConfigurationItemFilter(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
share dictionary screenshot of the field where you applied this
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
