How to add a button in email notification which will act as a link?

amolpawar
Tera Guru

Notification demo.png

 

 

Hello everyone,

 

I want to add a button in email notifications which will act as a link and after clicking on it, it will redirect the user to a related record.

Currently, I've added <button>${URI_REF}</button> in the source code. The button displays the record number in it. But I want to display text in that button and want the whole button as a link.

 

Thanks in advance!

Amol

1 ACCEPTED SOLUTION

jaheerhattiwale
Mega Sage

@amolpawar You can create a email notification script and add it to the notification.

jaheerhattiwale_0-1671703861278.png

 

In notification script you can add html as below

template.print('<a href="LINK HERE" >button</a>');

 

email notification script documentation: https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/new_to_servicenow/app_store_le...

 

Please mark as correct answer if this solves your issue.

View solution in original post

1 REPLY 1

jaheerhattiwale
Mega Sage

@amolpawar You can create a email notification script and add it to the notification.

jaheerhattiwale_0-1671703861278.png

 

In notification script you can add html as below

template.print('<a href="LINK HERE" >button</a>');

 

email notification script documentation: https://developer.servicenow.com/dev.do#!/learn/learning-plans/quebec/new_to_servicenow/app_store_le...

 

Please mark as correct answer if this solves your issue.