Email template get the URL field with link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 07:48 AM
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.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 01:17 PM
Thank you for your help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 07:16 PM
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
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 09:16 AM
Better to show some example or screenshot so that everyone can understand the format of existing field data format on incident communication task table.
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 09:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2022 10:02 AM
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
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
Regards,
Abhijit
ServiceNow MVP