Workflow studio copy all the Additional Comments and Notes accross to a new case created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI I am looking for help on how I can in Workflow studio copy all the Additional Comments and Notes accross to a new case created in the same flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello,
Do you want to keep the comments and work notes with the same timestamps ? Or you just are interested in all the content to be copied?
If just the content you can get via the data pill all the work notes like this :
The result is :
In this example my input is a reference field to an incident, so I am getting the comments and worknotes field which contains already all the data of both. If not then I would use the Work notes and the Comments separated. In this incident I just had work notes on my incident so that is the result you see.
Hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I would like it to Create the Note/Comments into seperate Notes/comments keeping the same created dates so they would be in the same order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
then you can use Lookup Records on sys_journal_field and grab all the comments and then create record into that table for your new case.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
If you need to have the same timestamps, there is not a way around other than creating technical debt, which I would advise not to do. You would have to modify the creation time of the new copied sys_journal_entry (not allowed by default), and refresh the sys_history_set / sys_audit and maybe it would work.
The requirement should be handled by just creating 2 journal entries when you copy the case, which is much easier to maintain and gives the same information in the end, ordered by date as you can see bellow :
Original Record :
Copied Record :
You can notice that it looks like the system admin created these entries, but you could just make your flow run as system so it would not have the avatar of the admin.
This was done just with 1 action on a flow that can be called from a ui action as you can see below:
Very simple to maintain.
Hope it helps.