In ESC my task widget when rejecting approval puts comment on RITM instead of Approval record

suhaibs
Tera Contributor

In the ServiceNow Employee Self-Service (ESS) My Task widget, when an approval is rejected, the entered comment is added to the RITM record instead of the Approval record

 

suhaibs_0-1737906758857.png

suhaibs_1-1737906793904.png

 

suhaibs_2-1737906854519.png

suhaibs_3-1737906901762.png

 

 

2 ACCEPTED SOLUTIONS

Twinkle S
Mega Sage
Mega Sage

Hi @suhaibs , 

This is OOB behavior. But to do the same you can write Before insert/Update BR on RITM Table Like below:

Condition: additional comments changes!

 

var gr = new GlideRecord("sysapproval_approver");
    gr.addQuery("document_id", current.sys_id);
    gr.query();
    if (gr.next()) {
        gr.comments = current.comments;
        gr.update();
    }
 
This will work as I tested it in PDI.
 
If you feel this was helpful, please consider giving thumbs up and if it solved your issue, please mark this correct.
Thanks

View solution in original post

To avoid copying the comments from RITM to Approval record , you can add condition like below

twinkle4_0-1737979329131.png

 Reason for rejection is automate text prefix which appears on the ritm comments once the approval is  rejected! Just tried this and it works . Only when the approval is rejected the comments appear on the approval record.

If you feel this was helpful, please consider giving thumbs up and if it solved your issue, please mark this correct.
Thanks

 

View solution in original post

8 REPLIES 8

Hey Twinkle,

Thanks for the solution you provided—it really helped me! I was wondering, though, is this the only way to solve it? Is there any way to configure the widget itself because when i tried for change record approval this time without need of any configuration, the comment appeared in the approval record, unlike with the RITM

Configuraing the widget I think wouldnt be of any help as Change /RITM approvals (and every other approval) is using same widget.   For change request there must be a BR written in the Backend. You can try and see if there's any BR written . Writing BR is also a better option then to configure a Widget.

Is there any problem you see with using a BR ? 

 

If you feel this was helpful, please consider giving thumbs up and if it solved your issue, please mark this correct.
Thanks

Thank you for your help! I’ve accepted your solution. If any questions arise, I shall ask again

Adam Lenger
Tera Contributor

I think this should be fixed by ServiceNow. I don't see any reason why the comments should not be present at approval record.

Whether it should or shouldn't be copied to the related record is another question. But the comment should be filled in approval record.