The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to get/fetch instance name dynamically in an email template script?

Balaraju K B
Tera Expert

Hi All,

I have a script in the email template for the Catalog approval request Notification in this email template How I can fetch instance name dynamically. Please find the below image for the script.

After 'href=' I want to fetch instance name

find_real_file.png

@Ankur Bawiskar Any idea on this?

 

Thank you,

Bala

10 REPLIES 10

Jorn van Beek
Tera Guru

you can use gs.getProperty('glide.servlet.uri') to get the uri of the instance

Mark Guldhammer
Giga Guru

Hi,

gs.getProperty('instance_name') should work in the template script.

Regards Mark

instance name + service-now.com will work 99% of the time but some instance have a custom uri. The glide.servlet.uri will also provide the correct uri in those cases.

I agree, but that was not the question asked 🙂

if I use directly it is not working using the above line in an email script then calling that email script is working