- 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:17 AM
I'm not sure that you can convert a RP to a Catalog item without remaking it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2020 10:21 AM
Hi there,
Yes it's possible, done this recently in another community question, have to look it up... though you could run a background script / fix script and change the class. Obviously, some difference do occur, like RP having a script field etc.. Though variables, Catalog Client Scripts, Catalog UI Policies would all be kept.
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:22 AM
Thanks, Mark. I was unable to find the method in another post searching the community. Can you link to it if you are able to find it?
Steve

- 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