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

catalog item

showsid02
Tera Contributor

i have to order 100 laptop for 100 differently user from a single catalog item(laptop) at a time.

 

How can i achieve this.

 

 

1 REPLY 1

Voona Rohila
Mega Patron
Mega Patron

Hi @showsid02 

below is the code to raise a request from back-end, Modify the details accordingly

 

var cart = new Cart("newCart", "");
var item= cart.addItem('give_item_sysid');
cart.setVariable(item,'variable_name1','value123');
cart.setVariable(item,'variable_name2','value123456');
var req_id = cart.placeOrder();
gs.info(req_id.number);

 

You can write the logic to get 100 user details and use above code in the loop.

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP