- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2024 07:59 AM
I have a requirement to capture value of requested for while redirecting user to another catalog item form when a specific value is selected in service affected dropdown. Requested for is a reference field which is editable. I am able to redirect to new form using client script but I am not able to pass the value of requested for. Kindly help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2024 01:53 AM
you will also need an onLoad client script on the other catalog item to get the value from URL and populate that
Did you add that 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-12-2024 08:07 AM
you can get the value and include that as url parameter while you redirect
please share your current 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-12-2024 11:53 PM
Hi @Ankur Bawiskar ,
Please find below the script I am using currently for redirecting to new catalog item:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2024 12:05 AM
try this
var urlEmail = instanceUrl + "abcdportal?id=sc_cat_item&sys_id=525de4751b546510e5ba6461604bcde5&sysparm_requestedFor=" + g_form.getValue('requested_forVariable');
If my response helped please mark it correct and close the thread so that it benefits future readers.
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-13-2024 01:48 AM
Hi @Ankur Bawiskar ,
I am getting the sys_id of the requested for in the redirected URL but its not setting up the variable value on the form. Variable name for both the fields is same (caller_id).