BR review: copy worknotes and comments from sc_task to sc_req_item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 07:39 AM
Hello, everyone!
Looking for some guidance on a business rule that we're using to copy comments and worknotes from tasks to RITMs. I've attached the rule to this post for review. The issue that we're seeing is that when multiple RITMs are associated with a REQ (Order Guide for example), the comments and worknotes from the tasks are copying to ALL RITMs instead of only the RITM that the task is associated with.
Any help is greatly appreciated!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 07:41 AM
Hello,
Go through below Article, it has solution
https://community.servicenow.com/community?id=community_article&sys_id=4750aecfdbf3d814fa192183ca961958
If you want for latest comment or worknotes then just append with below
current.comments.getJournalEntry(1)
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 01:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 03:52 AM
See in highlighted part, you are comparing REQ instead of RITMs hence it is copying to all RITMs instead of just parent RITM
So replace highlighted part with below query at both places.
.addQuery('sys_id', current.request_item);
This should work.
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 06:12 AM
Hello,
If you are fine with my response, Please hit like and mark my response as correct if that helps.
Regards
Regards,
Musab