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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

What type of link it is? Is it some url where user should be redirected to?

Is it ftp server url path?

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

The link redirects user to a file present in a local server. It looks like-

servername/folderName/fileName.vbs

Hi,

 

You can use:

${URI_REF} - display value of the record as link text.

Check if it is worked or not.

Audrey Deruere
Mega Expert

Hi Debanjana,

 

It's related to the sanitizer that not allow "file" protocole in OOB. Thing that you can made si to configure the script include "HTMLSanitizerConfig" and change the value of "HTML_WHITELIST" by

HTML_WHITELIST : {
globalAttributes: {
attribute:[],
attributeValuePattern:{}
},
urlAttributes: { protocols : [ "file" ] },
},

 

this code allow link to local file with protocol : "file"

Link to the documention :https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/security/concept/...

 

Regards,

Audrey