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

hide quantity on service portal for every catalog item

Servicenow10
Kilo Guru

i need to hide the quantity on sp for every catalog item

 

find_real_file.png

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi

Try this script in your background script - 

var gr = new GlideRecord("sc_cat_item");
gr.addEncodedQuery("type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^no_quantity=false");
gr.query();
gr.no_quantity = 'true';
gr.updateMultiple();

 

Regards,

Omkar Mone

View solution in original post

5 REPLIES 5

Omkar Mone
Mega Sage

Hi

Try this script in your background script - 

var gr = new GlideRecord("sc_cat_item");
gr.addEncodedQuery("type!=bundle^sys_class_name!=sc_cat_item_guide^type!=package^sys_class_name!=sc_cat_item_content^no_quantity=false");
gr.query();
gr.no_quantity = 'true';
gr.updateMultiple();

 

Regards,

Omkar Mone

it is working on one instance but not on another instance.......can please tell me where am going wrong

Karthik Reddy T
Kilo Sage

Please navigate to Maintain cart Layouts>Order Status>Columns and deselect the Quantity.

 

find_real_file.png

 

 

find_real_file.png

Karthik Reddy T.
ServiceNow Commnunity MVP -2018 class.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Have you checked the Portal Settings on the Catalog Items? Unfortunately, you do have to update all Catalog Items. Also, you could change the default value for this field.

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

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