Copy comments of approval of a requested item to the comments field of the RITM.

Student1
Tera Contributor

Hello,

I would like once a user comments something on an approval form (for example an approval of a requested item), the comments to be copied to the comment field of the requested item.

I would like to achieve the following:

1) Once the approver opens an approval form, he/she will be able to see all the comments that have been added in the RITM until that time.

2) Once the approver comments on the approval form, the comment to be added on the comments field of the RITM.

For example, on below screen, my user ("AAAA") opens the approval form. However, he is not able to see all the comments that have need added until now on the RITM. Then, we post a comment, this comment must be added to the comments field of the RITM.

find_real_file.pngThank you so much all.

1 ACCEPTED SOLUTION

Hi,

so it is going in loop.

please add this in both the BRs

var updateInitiatedBy = updateInitiatedBy || current.sys_id.toString();

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

    if(updateInitiatedBy != current.sys_id.toString()){   
     return;
    } 

// your code to update

})(current, previous); 

Regards
Ankur

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

View solution in original post

12 REPLIES 12

Hi,

so it is going in loop.

please add this in both the BRs

var updateInitiatedBy = updateInitiatedBy || current.sys_id.toString();

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

    if(updateInitiatedBy != current.sys_id.toString()){   
     return;
    } 

// your code to update

})(current, previous); 

Regards
Ankur

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

oooo thank you so so so so so much Ankur!!

Hi @Student1 
Could you please share screenshots of both the business rules you have created.
From Approval to RITM and from RITM to approval

I have this very same requirement but it's colliding and working on loop