Link in email notification not working

Cupcake
Mega Guru

I am trying to include a link in my email notification that will open the current approval record. This script is inside of a mail script.

'<a href="/ess?id=approval&view=ess&table=sysapproval_approver&sys_id='+current.getUniqueValue() + '">${current.sysapproval.number}</a>'

I've tried adding the link directly or adding the mail script but neither way is working:

 

a. Adding the link directly

Please click the link to  Approve or Reject the request: '<a href="/ess?id=approval&view=ess&table=sysapproval_approver&sys_id='+current.getUniqueValue() + '">${current.sysapproval.number}</a>'

 

b. Adding the mail script

Please click the link to  Approve or Reject the request: ${mail script:ess_approval_link_revised}

Any idea why this is not working.

 

1 ACCEPTED SOLUTION

Try this in mail script , below code is not tested, please verify if it satisfies your requirement 

    var gr = new GlideRecord('sysapproval_approver');
    gr.addQuery('sysapproval',current.sys_id);
     gr.addQuery('state','requested');
    gr.query();
    if (gr.next()) {
        template.print('<a href='+gs.getProperty('glide.servlet.uri')+'/ess?id=approval&view=ess&table=sysapproval_approver&sys_id='
+ gr.getUniqueValue() + '>' + gr.sysapproval.number + '</a>');
}
   

View solution in original post

7 REPLIES 7

Try this in mail script , below code is not tested, please verify if it satisfies your requirement 

    var gr = new GlideRecord('sysapproval_approver');
    gr.addQuery('sysapproval',current.sys_id);
     gr.addQuery('state','requested');
    gr.query();
    if (gr.next()) {
        template.print('<a href='+gs.getProperty('glide.servlet.uri')+'/ess?id=approval&view=ess&table=sysapproval_approver&sys_id='
+ gr.getUniqueValue() + '>' + gr.sysapproval.number + '</a>');
}
   

Worked perfectly thank you so much.

 

 

Hi Vignesh,

     I am now receiving reports that the Approve / Reject button is not visible on the ESS page when the approver clicks the link from the email. Any reason why?

I tested it and I don't see it either.

Karen