How to create RITM using script. I want to create child RITM. I am able to create ritm but not able to add variables to it.

Mrunal Nagarkar
Tera Contributor

I am using mentioned script.

var gr = new GlideRecord('sc_req_item');

  gr.initialize();

  gr.parent = current.sys_id;

  gr.cat_item.setValue('4b8b16ff1b201150d61afc468d4bcb0e');

  gr.variables.user = current.variables.user;
   

  var reqItem = gr.insert();

 

Please suggest how to add variables manually on RITM

1 REPLY 1

maroon_byte
Mega Sage

Use CartJS: https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_sc-namespace/c_CartJSScoped