Cart Api is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2019 09:50 PM
I am using the Cart API to create a catalog item , but for first time when I create a request, the data is not populating in the variables but when I submit the request second time request is creating and variables are populating with data .
I am attaching the screen shot of the code that I am using to create a catalog item.
can any one help with issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2019 02:51 PM
Use below code
var cart = new global.Cart(gs.generateGUID());
var item = cart.addItem('30db7eb84fd95740dc984da28110c7af');// update sys_id of catalog item
cart.setVariable(item,'requested_for',current.caller);
var rc = cart.placeOrder();
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2019 09:57 AM