- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 04:54 AM
Hi,
I have a requirement in my project where, the "Standard Changes" Category needs to be removed or hidden from "SC_categories" widget in portal. This category should be available in native UI but not in Portal. So making it "Actvie=false" is not an option.
As of Now I have tried Setting the "Hide on Portal" option available in Change Templates available under this category.
The templates/items are not visible on the portal now, however the category is still visible on portal.
Can anyone help on this?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 05:30 AM
Hello Yash,
As per my knowledge ootb there is no way to achieve the same. You can create a custom boolean field on sc_category table as "visibility_on_portal" and keep it true for "Standard Change" category.
Now you need to clone the existing SC Categories widget and add below code in server script
var sc = new GlideRecord('sc_category');
sc.addQuery('sys_class_name', 'sc_category');
sc.addQuery('visibility_on_portal', 'true');
sc.addActiveQuery();
Replace this cloned widget with the existing "SC Categories" widget.
Hope this helps.
Regards,
Monika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 05:30 AM
Hello Yash,
As per my knowledge ootb there is no way to achieve the same. You can create a custom boolean field on sc_category table as "visibility_on_portal" and keep it true for "Standard Change" category.
Now you need to clone the existing SC Categories widget and add below code in server script
var sc = new GlideRecord('sc_category');
sc.addQuery('sys_class_name', 'sc_category');
sc.addQuery('visibility_on_portal', 'true');
sc.addActiveQuery();
Replace this cloned widget with the existing "SC Categories" widget.
Hope this helps.
Regards,
Monika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 05:39 AM
If it is just for one category and you don't want to hide any other categories in future you can simply hardcode with below code in server script of SC Categories widget.
categoriesGr.addEncodedQuery(title!=Standard Changes);
Regards,
Monika

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2020 01:36 PM
Hi Yash,
I don't believe there is a way to accomplish this OOB and agree with Monika that cloning/modifying the widget is the only suitable workaround.
I reported this as an issue with HI support and they have raised PRB1418683 for it.
Thanks,
Warren