Best way to cleanup inactive Catalog items and its associated records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours 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 hours ago
Yes, I have done the script include way but wanted to check with community how others have addressed this. Thank you.