- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-31-2023 03:31 AM
In email notification script, passing the Universal request short description into the Subject of the Email, but some short description's contain double quotes, after the double quotes script neglect the remaining short description. I want to convert double quotes into the string so Subject will contain complete short description.
Email notification script :-
var button1 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + current.short_description + ' | close my ticket&body=Thanks! You can close my ticket."><img src="UniversalButton1.png" width="180" height="91"/></a> ';
template.print(button1);
var button2 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + current.short_description + ' | ReOpen&body=------ Please describe why the solution is not satisfactory for you ------"><img src="UniversalButton2.png" width="180" height="91"/></a>  ';
template.print(button2);
I attempted current.short_description.toString() this also not wotking.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-31-2023 03:36 AM
try this
var button1 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + encodeURIComponent(current.short_description) + ' | close my ticket&body=Thanks! You can close my ticket."><img src="UniversalButton1.png" width="180" height="91"/></a> ';
template.print(button1);
var button2 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + encodeURIComponent(current.short_description) + ' | ReOpen&body=------ Please describe why the solution is not satisfactory for you ------"><img src="UniversalButton2.png" width="180" height="91"/></a>  ';
template.print(button2);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-31-2023 03:36 AM
try this
var button1 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + encodeURIComponent(current.short_description) + ' | close my ticket&body=Thanks! You can close my ticket."><img src="UniversalButton1.png" width="180" height="91"/></a> ';
template.print(button1);
var button2 = '<a href="mailto: ' + gs.getProperty('glide.email.user.reopen') + '?subject=Re: ' + current.number + ' | ' + encodeURIComponent(current.short_description) + ' | ReOpen&body=------ Please describe why the solution is not satisfactory for you ------"><img src="UniversalButton2.png" width="180" height="91"/></a>  ';
template.print(button2);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader