When Approval is Rejecting, Unable to copy Rejection notes onto RITM for customer visibility

Bsnguyen
Kilo Explorer

Hello Service now Community!

 

I am currently working on approvals for a form in the service portal. I need to make it so that any rejection comments are visible to the requester. I figured I can do this by copying the rejection comments onto the RITM, however I am not successful. The method that has worked the most for me is creating a business rule in which the rejection comments copy onto the REQ close notes. Then I have another business rule where the close notes are suppose to copy in the RITM addition comments (customer visible) however that is not working. 

 

Below I will show what I currently have:

 

Business rule for when Rejection comments copies to REQ Close Notes:

Bsnguyen_0-1765840318401.pngBsnguyen_1-1765840343697.png

Business rule for when REQ Close Notes copies to RITM additional comments:

Bsnguyen_2-1765840407732.png

Bsnguyen_3-1765840426392.png

 

I am still learning about Service Now so any help is appreciated. Thank you so much for your time.

 

3 REPLIES 3

Jennifer Metz
Giga Guru

Hello @Bsnguyen,

 

I wanted to link a working solution for you.

 

I hope this helps!

 

Jennifer Metz
Sr. ServiceNow Developer | Infosys

Ankur Bawiskar
Tera Patron
Tera Patron

@Bsnguyen 

why not copy the rejection comments to RITM directly?

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    var gr = new GlideRecord("sc_req_item");
    gr.addQuery("sys_id", current.sysapproval);
    gr.query();
    if (gr.next()) {
        gr.comments = current.comments.getJournalEntry(-1);
        gr.update();
    }

})(current, previous);

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Deepak Shaerma
Mega Sage
Mega Sage

hi @Bsnguyen 

why you are using a double jump method from Approval → REQ → RITM , instead you can create a single BR on the sysapproval tablee , 

for current method, i think first business rule is correct, just update the second business rule.

(function executeRule(current, previous /*null when async*/) {

    var gr = new GlideRecord('sc_req_item');
    gr.addQuery('request', current.sys_id);
    gr.query();
    while (gr.next()) {
        gr.comments = "Request Rejected: " + current.close_notes; 
        gr.update();
    }

})(current, previous);


Happy to help! If this resolved your issue, kindly mark it as the correct answer   and Helpful 👍 and close the thread 🔒 so others can benefit too.
Warm Regards,
Deepak Sharma
Community Rising Star 2025