Workflow studio copy all the Additional Comments and Notes accross to a new case created

markdart
Kilo Guru

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.

2 REPLIES 2

Diogo Ramos
Giga Sage

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 : 

DiogoRamos_1-1757499292316.png

The result is : 

DiogoRamos_2-1757499407879.png

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.

Ankur Bawiskar
Tera Patron
Tera Patron

@markdart 

so from existing case you are creating new case and would like to copy comments and work notes?

You can use f(x) inline script and get all the journal entries using this method gr.work_notes.getJournalEntry(-1)  and the set that in work notes.

what did you start with and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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