Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Business Rule to submit catalog item scoped application.

Ben42
Tera Contributor

Hello,

I am using the below script in Business rule to submit catalog item when a ticket in scoped application is updated.

 

script:

var cart = new sn_sc.CartJS();
    //var cart = new gs.generateGUID(null);
    var request = {
        'sysparm_id': 'b128f81f8765c61486a10d4acfcc3652',
        'sysparm_quantity': '1',
        'variables': {
            'first_name': 'Abel',
            'last_name': 'Tuter'
        }
    };
    var cartDetails1 = cart.addToCart(request);
    gs.info(cartDetails1);
    var checkoutInfo = cart.checkoutCart();
    gs.info(checkoutInfo);
    var cartDetails = cart.orderNow(request);
    gs.info('See Details :', cartDetails);
 
But, it is not working... tried using "var cart = new sn_sc.CartJS();" and also tried using "var cart = new gs.generateGUID(null);" still no luck.
 
Any help is much appreciated. 
 
Thanks,
Ben.
5 REPLIES 5

Did you try it without the 

cart.orderNow(request);
?
Just wondering since I thought it would work with the one order line.