Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Copy RITM Comments (Including Approval Comments) to SC Task with correct order and user information

Aman Sharma1
Tera Contributor

Hi All,

 

I have requirement where i need to copy all comment from an RITM - Including comments added during approvals - to the related SC Task. The goal is to ensure that all comments made before the approval are reflected on the SC Task once it is created.

I'm currently able to copy the comments successfully. However, I'm facing 2 issues:

 

1 - Comments Sequence/order on the SC Task does not match the original order from the RITM.

2- User - who made the comment is not getting copied correctly - it often shows the wrong user or the same name user for all comments.

 

Can anyone suggest the best way to maintain the correct the order and created by user when copying RITM comments to SC Task

5 REPLIES 5

Hi @Its_Azar ,

 

I tried your code, but it is not working for User.  I have also put a log of sys_created_by  for ritm comments, 2 users are coming in it but when record created in journal table for sc_task table at that time I am seeing name of only one user on comments