- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 04:16 AM
Hi
I'm having a requirement where I have to display a hyperlink on email notification. That link should guide user to knowledge article present in the instance. The link to the article is present in a property. The link must work independant of instance.
Thanks in Advance
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 05:04 AM
Hi,
Use below login as per requirement.
Get Instance Name -
var instName = gs.getProperty("instance_name");
Get KB Article link -
var kbArticle = gs.getProperty("your_property_name");
template.print('<a href="https://' + instName + '.service-now.com/' + kbArticle + '</a>');
Please mark the answer as correct/helpful based on impact.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 04:49 AM
Hi,
You can create the link from followed by the below line of code:
template.print('<a href="https://' + gs.getProperty('instance_name') + '.service-now.com/nav_to.do?uri=incident.do?sys_id=' + gr.sys_id + '">' + gr.number + '</a>');
gs.getProperty('instance_name') gives you the current instance name.
Please mark correct answer if it helps.
Thanks,
Ankur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 04:53 AM
Hello,
You can use this below for Incident.. you can customize as per your requirement this below link. I used this in current Jakarta version and it works.
template.print('<a href="https://' + gs.getProperty('instance_name') + '.service-now.com/nav_to.do?uri=incident.do?sys_id=' + gr.sys_id + '">' + gr.number + '</a>');
Hope this helps. Please mark the answer as correct/helpful based on impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 05:04 AM
Hi,
Use below login as per requirement.
Get Instance Name -
var instName = gs.getProperty("instance_name");
Get KB Article link -
var kbArticle = gs.getProperty("your_property_name");
template.print('<a href="https://' + instName + '.service-now.com/' + kbArticle + '</a>');
Please mark the answer as correct/helpful based on impact.
Regards,
Sourabh
