Email template get the URL field with link

Kavitha
Tera Contributor

Hi All,

We have one field contain URL value in Incident communication task.Have to get that URL field in email template.Could you please suggest.

19 REPLIES 19

Thank you for your help

Glad to know Provided solution worked for you.

I see you had marked my answer correct before and then marked another response as correct. Unfortunately we can mark only one correct answer. 

In case two correct answers we expect people to mark first response as correct and other answers helpful. 

 

Thanks,
Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Abhijit4
Mega Sage

Better to show some example or screenshot so that everyone can understand the format of existing field data format on incident communication task table.

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP

Kavitha
Tera Contributor
Thanks for your quick response.We have one html field editor.There user used to type meeting link url.I want to add that URL in Email template.

Hi Kavitha,

I am assuming that you could access html editor field in notification email script.

However, when you try to access html editor text, it returns you something like below(assuming that someone has added link as Google.com)

<p>Google.com</p>

There are two steps you need to perform here,

First step is to remove this paragraph (p) tag from the text.

Below is the solution to remove those extra html tags.

var text="<p>google.com</p>";
var link=text.replace(/<[^>]*>/g, ' ');
gs.print(link);

Output

find_real_file.png

Second step is to add above google.com text as URL in your email.

<a href=""+link>Link to google </a>

You need to do this steps in email script.

Let me know if you have any further queries.

Please mark this as Correct or Helpful if it helps.

Thanks and Regards,
Abhijit

 

By marking my response as correct or helpful, you contribute to helping future readers with similar issues.
Regards,
Abhijit
ServiceNow MVP