Email URL with ampersand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2019 10:05 AM
I can't for the life of me get a simple link to work in a mail script.
var prefix = "<a href='" + gs.getProperty('glide.servlet.uri');
var main = "/acs?id=public_survey&instance_id=" + current.sys_id;
var last = "'>Click here to take your survey</a>";
template.print(prefix + main + last);
This produces the url: https://instance.service-now.com/acs?id=public_survey&instance_id=3fdb0cd61b3df3009830433fbd4bcb4e
The link doesn't work with & in it. When I update the link to just &, the link works great.
I tried using var main = "/acs?id=public_survey%26instance_id=" + current.sys_id; but that doesn't work, either.
How do I force the ampersand to stay exactly as it is in my link?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2021 02:27 PM
Hi,
If you don't mind, can you create a new post with your question?
Please feel free to mention me with the @ symbol and my name: Allen A
Thanks!
Please mark reply as Helpful, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2024 09:03 AM
Keeping this thread alive in the hopes someone may have found a solution to this?