How to add the link of the incident in the email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:48 AM
Hello community,
Coming to the work orders in Service portal. When the customers are emailed updates or notes or anything about the ticket it should have the ticket number and the link which leads to the particular incident.How should i proceed for this requirement.
Please share your ideas.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:51 AM
Take a look here, this should get you started:
Scripting for Email Notifications - ServiceNow Wiki
Cheers,
Tim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:51 AM
Hi Nagasri,
You can use something as Number: ${URI_REF} in the body of mail notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 09:13 AM
Hey,
My script is like this .Should i add Number: ${URI_REF} in the line template.print('</br><b>Number</b>: '+ current.number);?
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
//template.print('Hello,</br>');
template.print('<br/>Following are the ticket details<br/>');
template.print('</br><b>Number</b>: '+ current.number);
template.print('</br><b>Order Summary</b>: '+ current.short_description);
template.print('</br><b>Description</b>: '+ current.description);
template.print('</br><b> Asset/Location</b>: '+ current.asset_location);
if(current.asset_location == 'asset'){
template.print('</br><b>Asset</b>: '+ current.asset.getDisplayValue());
} else if(current.asset_location == 'location'){
template.print('</br><b>Location</b>: '+ current.u_site.getDisplayValue());
}
})(current, template, email, email_action, event);