Why Requested For is auto populating incorrectly in Request summary and RITM record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 03:24 AM
Hi Community,
I created a request for Aaron Shelly from portal and submitted the form.
After Submitting the form,in Request Summary showing Requested For as incorrect user name.
In platform,for REQ Requested For is showing correct.
but for RITM,its showing incorrect user name.
Could anybody please help with this issue?
Thanks,
Ankita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 04:45 AM
Hi,
Replace below code in the workflow and test it,
var rq = current.request.getRefRecord();
rq.requested_for = current.variables.u_requested_for.toString();
rq.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 04:56 AM
It's not working.Still the same issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 05:01 AM
did you add logs and check in workflow run script
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 05:04 AM
Hi,
Can you confirm the below logs,
gs.log('AAAA: request number is: '+current.request.getDisplayValue());
gs.log('AAAA1: requested for is: '+ current.variables.u_requested_for.getDisplayValue());
var rq = current.request.getRefRecord();
rq.requested_for = current.variables.u_requested_for.toString();
rq.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2021 05:06 AM
Hi Ankita,
Can you confirm me on this, why request field is not showing the request number?
What is the display value true on the sc_request table?