While using CartJS to generate a record producer, you can see some warnings in the logs


Details

Run script in the background:

var cart = new sn_sc.CartJS();
var request =
{
'sysparm_id': 'record producer sys_id',
'sysparm_quantity': '1',
}

var cartDetails = cart.orderNow(request);
gs.info(cartDetails);

You will get this message:

Error:
Evaluator: java.lang.NullPointerException
Caused by error in script at line 14

11: //var checkoutInfo = cart.checkoutCart();
12: //gs.info(checkoutInfo);
13:
==> 14: var cartDetails = cart.orderNow(request);
15: gs.info(cartDetails);

com.glideapp.servicecatalog.scoped.api.CartJS.jsFunction_orderNow(CartJS.java:546)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)

Additional Information

This is a valid error. The CartAPI is intended to use for Service Catalog not Record Producer.