- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 11:08 AM
Hello,
I have a link to another catalog item embedded into a custom notification sent from another catalog item. I would like when the user clicks the link to copy the requested for in the first catalog item and then populate the requested for on the 2nd catalog item. I saw this article but not sure how to do it. https://www.servicenow.com/community/developer-blog/3-ways-to-populate-values-in-servicenow-via-the-.... Any suggestions are appreciated.
Email Script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 01:16 PM
Hi @purdue
Follow below Steps
1. In the link part of your email script, concatenate below part in your URL to pass the requested for details.
"&sysparm_user="+current.requested_for;
2. To parse the user details from URL , in your 2nd catalog item you have to write onload client script as suggested in the link you shared and parse the value.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 01:16 PM
Hi @purdue
Follow below Steps
1. In the link part of your email script, concatenate below part in your URL to pass the requested for details.
"&sysparm_user="+current.requested_for;
2. To parse the user details from URL , in your 2nd catalog item you have to write onload client script as suggested in the link you shared and parse the value.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 08:14 PM
Hello,
Unfortunately this did not work. It keeps defaulting to me not the Requested For.
Thanks,
Chad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 11:17 PM
Can you share the code?
Are there any other client scripts or is there any default value set for requested for field in 2nd catalog item?
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2024 07:36 AM
Hello,
I was able to figure it out. I had the wrong url for service portal as sp instead of below.