Providing link to a variable value in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 12:23 AM
Hi All,
Is it possible to providing a link to a variable value in notification if the variable is reference to some table
Script I have written in notification ITCC # : ${current.variable_pool.ITCC_no}
Output ITCC # : CHG0004892 -------- here I wants link to that change number
Any help is appreciated ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 03:53 AM
Add the original link which I had provided at the end of the <mail_script> tag
<a href="nav_to.do?uri=change_request.do?sys_id=${current.variable_pool.ITCC_no.sys_id}">${current.variable_pool.ITCC_no}</a>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 05:32 AM
Its working and thank you for your help...
How to achieve this requirement in approval notification which will be sent from sysapproval_approver table............
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 06:43 AM
You can use the same logic over there as well with GlideRecord Operation in mail script tag. You can find the RITM number as GlideRecord and then you can dot walk to it to fetch the variable.
Kindly mark this post as correct / helpful if it solved you problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 07:01 AM
Could please explain me how to do this. I tried like below but it is not working
<mail_script>
template.print("Summary of Requested items:\n");
var item = new GlideRecord("sc_req_item");
item.addQuery("sys_id", current.sysapproval);
item.query();
while(item.next()) {
template.print(" Options:\n");
var keys = new Array();
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(item.sys_id);
set.load();
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() == 'ITCC #')
{
template.space(4);
template.print(' ' + vs.get(i).getLabel() + " = " + <a href="nav_to.do?uri=change_request.do?sys_id=vs.get(i).getValue() ">vs.get(i).getDisplayValue() </a> + "\n");
}
}
}
}
</mail_script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2015 10:40 AM
By keeping aside my previous suggestion of doing gliderecord operation, can you just add below tag without doing any Glide Record operation.
I guess that should also work.
<a href="nav_to.do?uri=change_request.do?sys_id=${sysapproval.sys_id}">${sysapproval}</a>