get the current instance name in an email link

randrews
Tera Guru

we currently use the following notification email script to pass a yes box for if they are satisfied with the resolution for a record...

template.print("<a href='mailto:instancename@firstam.com?subject=Re:${sysapproval}%20-%20happy&body=${watermark}'> Yes ${sysapproval}</a>");

obviously this is going to email our production instance... and i know i can use   + gs.getProperty('instance_name')   to get the actual instance name in the notification...


what i cant figure out is how to replace the instance name in what we have with the gs.property and get it to look up the instance name correctly... no matter how i break the single and double quotes it doesn't work correctly... while i realize this isn't a huge issue <just change the instance name when testing> it annoys me....


any ideas on how to get that to work right?

1 ACCEPTED SOLUTION

edwin_munoz
Mega Guru

Hello Doug,



I'm not exactly sure if this is what you are looking for. Sorry if I didn't understand correctly.



template.print("<a href='mailto:" + gs.getProperty("instance_name") + ".firstam.com?subject=Re:${sysapproval}%20-%20happy&body=${watermark}'> Yes ${sysapproval}</a>");


View solution in original post

3 REPLIES 3

edwin_munoz
Mega Guru

Hello Doug,



I'm not exactly sure if this is what you are looking for. Sorry if I didn't understand correctly.



template.print("<a href='mailto:" + gs.getProperty("instance_name") + ".firstam.com?subject=Re:${sysapproval}%20-%20happy&body=${watermark}'> Yes ${sysapproval}</a>");


I agree with Edwin. That should work fine.


randrews
Tera Guru

thanks that did it... just had to get rid of the single quotes they had in the middle!