- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:12 AM
Hello Community,
Can any one help below requirement.
I want to display the number in notification body through email script and if i click that number it should be open form view same record and i dont want to open in service portal.
anyone help me with the script it's highly appreciated.
Thanks,
Ramesh kalava
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2020 05:22 AM
Hi
In your script you can do simply like this
var attachLink = '<a href="/incident.do?sys_id='+current.sys_id+'">' + current.number + '</a>'; //put your table name
template.print(attachLink);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:36 AM
It's displaying 0 value in body instead of number

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:40 AM
It'll depend on the record you're trying to set up a notification for. If it has no number field then it will likely display 0 (i.e null).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:43 AM
this record having the number kieran

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:56 AM
Can you provide more information on what you're trying to achieve? Screenshots etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:57 AM
Hi Kalava,
Could you try below script
var instance_name = gs.getProperty('instance_name');
var table= current.getTableName();
var url = "https://"+instance_name+".service-now.com/nav_to.do?uri="+table+".do?sys_id="+current.sys_id;
template.print(url);
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.