- 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 08:25 AM
Hi @Prasnajeet1
Have a look in OOTB notification
https://INSTANCENMAE.service-now.com/now/nav/ui/classic/params/target/sysevent_email_action.do%3Fsys_id%3D927afd45c0a8010a001f28267acf98e4%26sysparm_record_list%3Dactive%253dtrue%255enameCONTAINSappro%255eORDERBYorder%26sysparm_record_row%3D2%26sysparm_record_rows%3D40%26sysparm_record_target%3Dsysevent_email_action%26sysparm_view%3Dadvanced%26sysparm_view_forced%3Dtrue
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:01 PM
Hi Atul
Thanks for your quick response however OOB is not something I am looking. In case of oob it is coming as "LINK" however in my case I am looking the entire line as link along with the RITM number.
Something like "Click here to Approve/Reject RITM000000"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 10:29 PM
Hello @Prasnajeet1,
Kindly use below code in your email script.
var url=gs.getProperty('glide.servlet.uri')+'sysapproval_approver.do?sys_id='+ current.sys_id;
template.print("Click here to Approve/Reject:" );
template.print('<a href=' + url + '>'+current.sysapproval.number+'</a>' );
This will give below output.
which will redirects you to the approval page.
Hope this help!
Kindly mark helpful/accepted if assists.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 11:02 PM
Hi
I tired with your script as well but not sure what is wrong in my instance I am still getting the link as "Click here to Approve/Reject undefined".
Could you please help me on this