RemoveIT catalogs from hr portal favorite widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 03:30 AM
Hi developers,
We need help for one of the issue,
We have created new hr portal, added favorite widget to it, but it's shows both IT and HR catalogs and articles favorite s, how to remove IT catalogs and articles and show only HR catalogs and articles.
Filter only HR related.
Any help would be much helpful.
Thanks,
Svani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 05:48 AM
I investigated something and shared the details.
Please look into that and enhance further.
Do keep us posted once you get the working solution so that it helps other members in future.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 05:17 AM
whenever you add any item to favorites an entry is made to this table "sp_favorite"
this line brings the favorite in the Favorites widget
var favoriteApi = new sn_ex_sp.FavoriteAPI();
When you run this script in background it gives this
var favoriteApi = new sn_ex_sp.FavoriteAPI();
gs.info(JSON.stringify(favoriteApi));
Somehow you will have to manipulate this JSON which you get and ensure the further JSON i.e. processed JSON doesn't include the favorites which are with IT Catalogs
This you will have to do in the server side script
Take help from this link
How to hide catalog items in popular items?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader