Unable to fetch values from variables of a catalog task into a RITM

Nilanjan1
Mega Sage

Hello Team, 

 

I am able to relate a new RITM in an existing request through a UI action. However I am unable to get the values like assignment group; & short description to be populated into the RITM. What may be the reason The code is as follows, the entire process is working through a UI action (involving insert of variable data etc.). can someone advise asap?

 

 

 

 

//Creating the RITM
var reqHelper = new GlideappCalculationHelper();
        reqHelper.addItemToExistingRequest(current.request, '0728b2051ba60014334efc031d4bcb61', 1); // 1 is the qty
        reqHelper.rebalanceRequest(current.request);
// Update the variables in the created RITM
        var createRITM = new GlideRecord("sc_req_item");
        createRITM.initialize();
        createRITM.assignment_group = current.assignment_group;
        createRITM.short_description = "Discovery on demand – " + current.variables.ip_address;

 

 

 

 

Regards

Nilanjan

11 REPLIES 11

@Nilanjan1,

You need to run ritm.insert() or ritm.update() after setting those values.  Is that in your script?  This is on sc_req_item right?  Are you sure there is an assignment group?  Could you use an Assignment Rule instead?

Thank you Ricker, I am working through this I would keep you guys posted.