How to hyperlink a file path (e.g: \\servername\folderX\file.vbs) into a notification email script?

Debanjana
Tera Contributor

Hi all,

 

I have a requirement to add a clickable link into a notification, which will be sent to user on request completion. 

The link should redirect user to a file present on a server. I tried using the following syntax into my email script , but it is not working. 

<a href="file:///\\servername\folderX\file.vbs"target="_blank">Link to file</a>

Any lead will be highly appreciated.

 

Thanks

13 REPLIES 13

Hi Sanjiv,

I'm trying to hyperlink a file path in Knowledge article, added this line " urlAttributes: { "protocols" : [ "file", "notes" ] }," under HTML_WHITELIST Class in the script include but still the file doesn't open through the article however if I copy paste the URL it gets downlaoded.

Can you please suggest something here, any help is greatly appreciated!

 

Ankita

 

Can you post a screenshot of where you added it?


Please mark this response as correct or helpful if it assisted you with your question.

Hi Sanjiv,

I tried these two ways , but no luck

1. template.print('<a href="file:///servicenow\tracker\files"  target="_blank">Link here for Files</a>');

 

2. template.print('<a href="\\servicenow\tracker\files"  target="_blank">Link here for Files</a>');

 

When I try to access the file in Chrome/Edge, it opens. I can go to the specific path and find the files.

But when this is embedded into the notification script, it does not redirect user to that. 

 

Could you please help me on it

Sironi
Kilo Sage

@Debanjana did you get any solution please ? if you have solution kindly help me on it

I tried these two ways , but no luck

1. template.print('<a href="file:///servicenow\tracker\files"  target="_blank">Link here for Files</a>');

 

2. template.print('<a href="\\servicenow\tracker\files"  target="_blank">Link here for Files</a>');