
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2022 10:50 AM - edited 10-10-2022 10:51 AM
Hi ,
I am trying to create a link in a workflow notification, for this I have tried the below email script in Workflow notification but it did not work.
<mail_script>
var gr = new GlideRecord('u_request_item');
gr.addQuery('sys_id',current.u_document_id);
gr.query();
if(gr.next())
{
template.print("Request ID : " +<a href="myinstance.service-now/nav_to.do?uri=u_request_item.do?sys_id=${gr.sys_id}">${gr.number}</a> +'\n');
}
</mail_script>
If it is wrong, help me with it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 10:01 AM
Your quotations (") are all messaged up in your template.print line. Try fixing that and it should be good. I recommend putting your script in a script editor (script field) so you can see any syntax errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 10:01 AM
Your quotations (") are all messaged up in your template.print line. Try fixing that and it should be good. I recommend putting your script in a script editor (script field) so you can see any syntax errors.