- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 05:54 AM - edited 01-04-2024 06:22 AM
Hi All,
Actually we have a requirement we have notification on Project table, in that body we have to insert a link that will redirect to Agile board of Project plannings?
Please help me to complete this
Thanks
Ramu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 11:45 PM
Try this:
var baseLink = gs.getProperty('glide.servlet.uri')
template.print("<a href=" + baseLink + "$agile_board.do#/sprint_tracking> Agileboard</a>")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 08:14 AM
Hello @Ramu6 ,
If you have a static url, you can just simply use, html editor option from screenshot:
If you wanted to make it dynamic, See the below notifcation email script for example, by using this I can surely say you can create lot more complex link for you email notification.
(function runMailScript(current, template, email, email_action, event) {
var mark = email.watermark;
var baseLink = gs.getProperty('glide.servlet.uri')
var instance = gs.getProperty("instance_name");
var link = "https://" + instance + ".service-now.com";
var emailAddress = instance + "@service-now.com";
var googleLink = 'https://www.facebook.com';
template.print('<a href="https://www.facebook.com"> Google</a>');
template.print("<a href=" + baseLink + "incident_list.do?sysparm_clear_stack=true> Approve</a>");
template.print('<span style="color: #ffffff;"><span id="requestapprove" class="btn" style="margin-left: 16px; border-radius: 4px; border: 1px solid #ffffff; padding: 6px 16px; background-color: #4f52bd;">');
template.print('<a href="mailto:' + emailAddress + '?subject=Re:' + current.sysapproval.number + ' ' + ' - approve&body=%0A%0A' + mark + '"style="color:white;font-size:16px;font-weight:bold;"' + link + '"> Approve</a></span>');
template.print('<span style="color: #ffffff;"><span id="requestreject" class="btn" style="margin-left: 25px; border-radius: 4px; border: 1px solid #ffffff; padding: 6px 16px; background-color: #4f52bd;">');
template.print('<a href="mailto:' + emailAddress + '?subject=Re:' + current.sysapproval.number + ' ' + ' - reject&body=%0A%0A' + mark + '"style="color:white;font-size:16px;font-weight:bold;"' + link + '"> Reject</a></span>');
})(current, template, email, email_action, event);
Make sure to call this script in your mail body as:
${mail_script:notifcation_email_script_name}
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 07:34 PM
Thanks for the response
the url which was mentioned in screenshot needs to be insert in the notififcation dynamically through email script , because , if it is in dev it needs to redirect to dev agileboard and if prod it redirects to Prod
Thanks
Ramu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 08:58 PM
var baseLink = gs.getProperty('glide.servlet.uri')
template.print("<a href=" + baseLink + "incident_list.do?sysparm_clear_stack=true> Agileboard</a>");
Just use this code, in your email script, the first line will give you dynamic url based on you instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 11:41 PM
Understood that , my concern was how should i place my agile board link instead of incident list in above code?
Thanks
Ramu