- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We need to remove catalog items that have been inactive for more than 6 months. This cleanup will include deleting associated variables, client scripts, UI policies, and UI policy actions.
Is there an out-of-the-box (OOB) solution to handle this cleanup, or should we implement it using a scheduled job?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rajini2,
there's no OOTB solution to this.
In a first wave, you can just deactivate the catalog items, and the associated scripts or other configurations will not be used as it's inactive. You can use a fix script or an update job but for periodically deactivating in future you will need a scheduled job, exactly as you said.
You will have to script a few searches > for a catalog item, use the sys id to search for catalog client scripts, flows, variables, variable sets, catalog ui policy + actions.
- Variables: [item_option_new]
- Var Sets [io_set_item]
- Catalog UI policies [catalog_ui_policy]
- Catalog UI Policy Actions [catalog_ui_policy_action]
- CCS [catalog_script_client]
And maybe you want to deactivate the user criteria (Not/Availble for), Catalog, Categories and Taxonomy topics...?
PS: wouldn't it be more effective to use the same logics immediately when a catalog item is deactivated? or why waiting half year???
No AI was used in the writing of this post. Pure #GlideFather only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rajini2,
there's no OOTB solution to this.
In a first wave, you can just deactivate the catalog items, and the associated scripts or other configurations will not be used as it's inactive. You can use a fix script or an update job but for periodically deactivating in future you will need a scheduled job, exactly as you said.
You will have to script a few searches > for a catalog item, use the sys id to search for catalog client scripts, flows, variables, variable sets, catalog ui policy + actions.
- Variables: [item_option_new]
- Var Sets [io_set_item]
- Catalog UI policies [catalog_ui_policy]
- Catalog UI Policy Actions [catalog_ui_policy_action]
- CCS [catalog_script_client]
And maybe you want to deactivate the user criteria (Not/Availble for), Catalog, Categories and Taxonomy topics...?
PS: wouldn't it be more effective to use the same logics immediately when a catalog item is deactivated? or why waiting half year???
No AI was used in the writing of this post. Pure #GlideFather only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Yes, I have done the script include way but wanted to check with community how others have addressed this. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Rajini2 ,
As per my knowledge..there is no oob feature that will automatically delete old, inactive catalog items and all their associated records like variables, client scripts, ui policies and ui policy actions.....best approach would be first deactivate the catalog items when they haven’t been used or updated in your defined period and then write a scheduled job or fix script that looks up inactive sc_cat_item records older than your threshold and iterates through related tables to delete those dependencies before finally deleting the catalog item itself, and over time you can automate that on a schedule so that cleanup happens routinely without manual intervention........
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Technical Consultant - ServiceNow Class of Legends 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Rajini2 , There's no OOTB solution to auto delete any catalog items that are active or inactive.
The best way to handle this is to check the corresponding variables, variable sets , client scripts, UI policies used for the catalog items that are no longer required/inactive.
Also, deleting anything from Servicenow is not recommended. We always mark the configuration as active false so that it can be used in future for reference.
If my response has helped you , kindly mark it as helpful and accept the solution so that the future readers can benefit.
Regards,
Nayan
