The CreatorCon Call for Content is officially open! Get started here.

Is there a way to change a catalog item to a record producer

Cupcake
Mega Guru

I created a catalog item, but after further conversation with the customer, this now needs to be a record producer.

Is there a way that I can change the catalog item to a record producer without loosing the work that I did already?

This is my first time creating a record producer.

Thanks,

Karen

1 ACCEPTED SOLUTION

Cupcake
Mega Guru

Hey everyone I posted this question 3 years ago, but I found a way. You can run this script as a background script.

 

var gr = new GlideRecord("sc_cat_item"); gr.get("sys id of the catalog form that you want to change to a record producer"); gr.sys_class_name="sc_cat_item_producer"; gr.update();

 

Hope this is helpful to someone.

 

Karen

View solution in original post

19 REPLIES 19

Tek1
Kilo Contributor

Can you please explain it in detail?

Unfortunately, when I tried this, I received this error message

 

find_real_file.png

find_real_file.png

You need to modify the script to make sure that you get a valid record producer. This worked for me:

var gr = new GlideRecord("sc_cat_item"); 
gr.get("YOUR SYS ID"); 
gr.sys_class_name="sc_cat_item_producer"; 
gr.setValue('request_method' ,''); 
gr.setValue('no_cart_v2', false); 
gr.setValue('no_delivery_time_v2', false); 
gr.setValue('no_quantity_v2', false); 
gr.setWorkflow(false); 
gr.update();

This worked?? 

Treva1
Kilo Contributor

do you have instructions on where to run the background script?