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

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

Hello,

Unfortunately this did not work.  It keeps defaulting to me not the Requested For.

Thanks,

Chad

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

Hello,

I was able to figure it out.   I had the wrong url for service portal as sp instead of below.   

'serviceportal?id=sc_cat_item.  Thanks for the assistance.