I need to create a button on email notification And on click that button should redirect me the linked incident.

Deepali Rattan
Tera Contributor

Hi

I need to create a button on email notification And on click that button should redirect me the linked incident.

Can anyone help?

9 REPLIES 9

Uncle Rob
Kilo Patron

{URI_REF} already does the linking bit.  You just need to wrap that in HTML that looks button-ish.

var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') +current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
template.print(agentURL + "<br />")

Hi @Robert Fedoruk 
can you help with what is wrong in this?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

if you want link then do this

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + '/nav_to.do?uri=' + current.getTableName() + '.do?sys_id=' + current.sys_id + '">' + current.number + '</a>';  
template.print(url);

if you want to show button and on click of that incident should open refer below link for same; just enhance it as per your need

Approve/Reject button in Approval notification

Regards
Ankur

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

Hi Ankur

How to add this link in button?