Link to redirect to approve and reject form in Change Request

Sakshi Lambat
Tera Contributor

In Notification, how to put link of approve and reject form in the change request so that the person can click on the approve link in the email and will redirect to Approval form or list to approve the change request. Can anyone help me in this?

 

2 REPLIES 2

Pratik Malviya
Tera Guru

Hi @Sakshi Lambat ,

 

Please check below community post to achieve your requirements.

https://www.servicenow.com/community/itsm-blog/approve-reject-button-in-approval-notification/ba-p/2...

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Thanks,
Pratik Malviya

Kristen Ankeny
Kilo Sage

You'll need to write the html code to point to the approval record URL. In the mail script you should be able to access the approval record itself, so it's just a matter of opening an approval record in the system, copying the URL, and then creating the url, replacing the sys_id of the specific approval you opened with the dynamic sys_id from the originating approval. You should also make sure that the link works in all environments, there is a property called glide.servlet.uri that contains the current environment's main url. You'll want to us that. So something like:

var mainUrl = gs.getProperty('glide.servlet.uri');
var approvalUrl = mainUrl + 'now/nav/ui/classic/params/target/sysapproval_approver.do%3F' + current.sys_id;