- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 08:18 AM
Hi All
I am creating a link to approve/reject a request. In my email script I have written below script. When user click on the link it should redirect the user to sysapproval_approver table to that record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 08:48 AM
Hi All
Thank you for all your answer. Really appreciated. Finally I am able to fix the issue. Below is the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:32 PM
Hi Anand
Thanks for you quick response. I try with your script as well. But now nothing is coming. no link, nothing. Its blank.
Do I need to provide my instance url in the script. ( + instanceURL +)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 12:07 AM
Hi @Prasnajeet1 ,
No need to change url it will differ from instance to instance
I have tried below script in my pdi its working for me
var instanceURL = gs.getProperty('glide.servlet.uri');
var tableName = 'sysapproval_approver';
var myURL = '<a href="' + instanceURL + '/nav_to.do?uri=' + tableName + '.do?sys_id=' + current.sys_id + '">Click here to Approve/Reject ' + current.sysapproval.number + '</a>';
template.print(myURL);
When i click on link navigating to below record
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 12:40 AM
my notification and email template is written on sc_req_item.
Can this be the reason for that link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:50 PM
Hi @Prasnajeet1
Can you try with getDisplayValue() method once?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 12:30 AM
I already tried with this but still getting that undefined value.
Click here to Approve/Reject undefined