- 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 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 04:20 AM
Hi Alberto,
Before i proceed just wanted to confirm will this work for Service Portal and secondly i am using Kingston.So will this work as expected.
Regards,
Viraj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 04:27 AM
Hi Viraj,
as you can see I've tested it using the hyperlink for backend and service portal, so both are working fine, also in Kingston, no problem.
Let me know if you will make it work!
Please remember to mark my response as correct and/or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2020 04:56 AM
One more question I have that is do I need to create the property as i can't find the one you have mentioned out of the box.
Regards
Viraj