how to fetch approver name when notification table is ritm?

Servicenow10
Kilo Guru

my notification is on ritm table how can i fetch the approver name in it and display it

1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi,

Assuming your approval request is for RITM. you can write a simple mail script and call that in your notification, something like below

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval",current.sys_id);
gr.query();
if(gr.next()) {
  template.print(gr.approver.getDisplayValue());
}

and then in your notification, call it

${mail_script:your_script_name}

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP

 

View solution in original post

1 REPLY 1

asifnoor
Kilo Patron

Hi,

Assuming your approval request is for RITM. you can write a simple mail script and call that in your notification, something like below

var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval",current.sys_id);
gr.query();
if(gr.next()) {
  template.print(gr.approver.getDisplayValue());
}

and then in your notification, call it

${mail_script:your_script_name}

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP