- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 03:46 AM
I want insert hyperlink of a catalog item in notification through mail script in Servicenow.How to proceed further on this
Solved! Go to Solution.
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 04:13 AM
Hi,
create your Notification Mail Script with the following code (tested in my PDI, it works fine) and call it in your own Email Notification (example: put in message html text ${mail_script:sc_request_script_1}😞
var instance_url = gs.getProperty('glide.servlet.uri');
var url = instance_url+ 'com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id='+ '060f3afa3731300054b6a3549dbe5d3e'; // put your Catalog item sys_id here
template.print('<a href="'+url+'">Click here the Request</a><br />');
In case you need to open the Catalog Item of the Service Catalof in the SP portal, please use the following code:
var instance_url = gs.getProperty('glide.servlet.uri');
var url = instance_url+ 'sp?id=sc_cat_item&sys_id='+ '060f3afa3731300054b6a3549dbe5d3e'; // put your Catalog item sys_id here
template.print('<a href="'+url+'">Click here the Request</a><br />');
This the result in the Email Notification:
Result in the SP portal:
Let me if it works!
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 05:05 AM
no need to create any property, I've just used this code in my OOTB PDI without creating any property, it's working fine, just give a try!