Possible to convert a Record Producer to a Catalog item?

incrypto
Tera Contributor

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

1 ACCEPTED SOLUTION

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

LinkedIn

View solution in original post

11 REPLIES 11

That is not possible.

Either create new fields or go to each field and manually change the mapped Catalog Item name.

Where to write the script?