Mail Script url Link add the ritm number as the Link Text

triciav
Kilo Sage

I need to have the Link text to be the actual ritm number

How can I build the url to do that

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id+ '">{current.number}</a>';

So instead of this + '">Click here to view request</a>'; 

I need the actual ritm number

template.print(url);

 

I thought I answered my own question with ${URI_REF} but that does not redirect to the url I am building

I need it to redirect to the url but have the RITM number as the Link type text

1 ACCEPTED SOLUTION

Ahmad1
Tera Contributor

looks like he had some quotes backwards after the current.sys_id

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id+ '">' + current.number + '</a>';

View solution in original post

9 REPLIES 9

Ahmad1
Tera Contributor

you had the current.number inside the quotes so it was taking it as a string 

rajneeshbaranwa
Giga Guru

Below should work.

 

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id+ "'>' + current.number + '</a>';

I am getting parsing error unterminated string constant

Ahmad1
Tera Contributor

looks like he had some quotes backwards after the current.sys_id

var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id+ '">' + current.number + '</a>';

Awesome!

 

Thank you this worked!