- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2020 10:14 AM
Hi,
I have a couple large record producers (one has 73 variables) and I need to change them to Catalog Items. The original versions are client-facing forms that generate a Case; I've copied them and made them internal only and need to turn them into Catalog Items. Is this possible? And if so, how?
My normal method of converting a Catalog Item to a Record Producer by simply changing the Class is not an option (only Record Producer is available to select from the "Class" list). This is the case for all of the Record Producers I tested this on.
Thank you!
Steve
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2020 10:27 AM
Just quickly tested this, thought will be quick then finding the topic 🙂
var gr = new GlideRecord('sc_cat_item');
if(gr.get('7434fcaf4f228410e7fe0ab18110c7dc')) {
gr.setValue('sys_class_name', 'sc_cat_item');
// gr.setValue('sys_class_name', 'sc_cat_item_producer');
gr.update();
}
And the background script showing:
Change in class detected, switching from: sc_cat_item_producer to: sc_cat_item sys_id: 7434fcaf4f228410e7fe0ab18110c7dc
Looked at the list and the Record Producer (or now Catalog Item): looks fine! Obviously do test carefully and maybe even make an export to be sure.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2020 10:29 AM
Great thank you very much! I'll let you know if I get this going successfully with my items.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2020 10:59 AM
Your fix script worked perfectly. I just swapped out the sys_id of course. Both forms fully function like they did before the switch.
Thanks again Mark.. that saved me easily a full day's worth of pretty tedious work!
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2022 06:10 AM
Did you use the scripts for the original Record Producers? if so, after conversion, how did you handle this feature being missing? were looking into moving a bunch of RP's over and this is a big sticking point for us. any help or advice would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2023 07:34 AM
Does this work for the Scoped app Record Producer as well?
I ran your script but the Record Producer is still Record Producer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2024 09:20 PM
But how to map fields ?