Can anyone help me how to capture the Approval time when the RITM has approved by manager

Likithsai
Tera Contributor

Can anyone help me how to capture the Approval time when the RITM has approved by manager. I am sending 1 notification from workflow to the user.

I didnt find any field in the approval table. i want the time when state changes to approved and that time need to write in email script and send notification

5 REPLIES 5

Alikutty A
Tera Sage

Hello,

You can create a new field to capture Approval Date and capture it in the Approval UI Action script.

current.u_approval_date = new GlideDateTime();

Thanks!

Likithsai
Tera Contributor

Thanks, but new field i cannot. I can do getjournal(1) and then trim all the details. 

You can try this script

var gr = new GlideRecord("sysapproval_approver");

//Fetch you approval record in GR for RITM here

if(gr.next()){
  var lastDate = gr.comments.getJournalEntry(1).split(" - ")[0]);
}

Harish Kumar3
Mega Guru

Hi Gopi,

On RITM table, Field "Approval set" used to capture approval datetime("Approval set" is an OOB field).

"Approval Set" field value populate when "Approval" field marked as "approved".

 

Thanks,

Harish