Requested for is different on the form and on the RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 04:15 AM
Hi Experts,
Good Day!
I have recently created a catalog item. When we fill the form and give the name on the requested for variable and submit. I am getting he Requested for name on the request and ritm is the the person who submitted the request.
Could you please help me how to solve this. the requested by and requested for are same on the RITM and Request. Even thought we change the requested for while filling the form.
Best Regards,
Atchutram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 04:23 AM
Hi @Atchutaram ,
Please try using this before BR on request table.
(function executeRule(current, previous /*null when async*/) {
var grRITM = new GlideRecord('sc_req_item');
grRITM.addQuery('request', current.sys_id);
grRITM.query();
while (grRITM.next()) {
if (!JSUtil.nil(grRITM.variables.requested_for)) {
current.requested_for = grRITM.variables.requested_for;
}
}
})(current, previous);