Unable to fetch values from variables of a catalog task into a RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 08:50 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2023 12:03 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2023 08:13 AM
Thank you Ricker, I am working through this I would keep you guys posted.