Embedded Catalog Item Link in Notification populate from RITM when Clicked

purdue
Kilo Sage

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

Screenshot 2024-10-03 at 1.54.38 PM.png

Screenshot 2024-10-03 at 2.07.14 PM.png

1 ACCEPTED SOLUTION

Voona Rohila
Kilo Patron
Kilo Patron

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

View solution in original post

6 REPLIES 6

And instead of sysparm_user I had to use sysparm_requested_for=

mihirlimje867
Tera Guru

Hello @purdue ,

You can first create one variable and get the requested for sys_id and then you can pass in the new catalog item URL.

For ex:

   var catalogItemSysId = '21vfgyh45hh8a10e958c805dabbrggf51h';
    var callerID = '5kjgffngfd7d9ddjf343bfkjdf03tnk334'; // pass the normal string if the field is not a reference type.
    var inciNumber = 'INC00001';
var URL = /sp?id=sc_cat_item&table=sc_cat_item&sys_id=' + catalogItemSysId + '&sysparm_caller_id=' + callerID + '&sysparm_number=' + inciNumber;


I hope this will help you.
Please hit on the helpful Answer.

Thank you.