How to map Request_for variables with Ritm Request_for variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 10:40 PM
Like the below screenshot ..i want the exact value for request_for which is mentioned in the variables section.
Can anyone provide me BR code...because I have to write only BR.
Thanks in advance.
- Labels:
-
Multiple Versions
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 10:46 PM
Hi you can have this in before insert BR on sc_req_item table
current.requested_for= current.variables.requesting_for; // write the variable name of the Requestor variable in place of bold text
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 10:47 PM
Hi Kashim,
You need a Business rule for that.
var req = new GlideRecord('sc_request');
req.get(current.getValue('request'));
req.requested_for = current.variables.requested;
req.update();
if the field is on the requested item table, you can use it before update the business rule.
current.u_requested_by = current.variables.requested;
Best Regards,
Prashant
If my answer helped you in any way, please mark this answer as helpful and correct.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************