How to set RITM Opened By value with CartJS API?

subhadeep1618
Tera Guru

I am using CartJS API to dynamically create RITM.

Everything is working fine.

But I am not able to customize the Opened By field's value in the RITM by the following code:

var ritm = {
  sysparm_id: "catalog sys id",
  sysparm_quantity: "1",
  sysparm_requested_for: "custom value",
  sysparm_opened_by: "custom value", /** NOT WORKING **/
  variables: {
    variable1: "custom value",
    variable2: "custom value",
  },
};

Can someone please tell me what is the correct parameter name to do this.

In above code, sysparm_opened_by is not working.


Please mark this post as a solution and also as helpful, if this resolves your issue or query.

Thanks,
Subhadeep Ghosh.
10 REPLIES 10

Hema Joshi1
Tera Contributor

Hi,

Once you created the request from the cart store the request id in a variable.

var requestDetails = cart.submitOrder(request);

gs.info(JSON.stringify(requestDetails));

var requestId = requestDetails.request_id ;
 Then Glide Record to sc_request table and try to update the opened by it will work.