copy work notes to short description form one catalog task to another catalog task

karishmashaik
Kilo Expert

Hi all,

I have a requirement, copy the work notes content to short description form one catalog task to another catalog task ,copy the work notes to short description form TASK1 to TASK2 and to TASK3.

 

please help me on this 

 

Thanks,

karishma.

1 ACCEPTED SOLUTION

Hi 

above code is to copy worknotes to another task wornotes.

try below code

 

var grScTask = new GlideRecord('sc_task');
grScTask.addEncodedQuery("request_item=" + current.request_item +"^sys_id!=" + current.sys_id);
grScTask.query();
while (grScTask.next()) {
    grScTask.short_description = "Worknotes from " + current.number + " : " + current.work_notes.getJournalEntry(1);
    grScTask.update();
}

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

8 REPLIES 8

Hi Rohila Voona,

It's not working ,work notes content is not copied in description in one sc_task to another sc_task when state is close complete.

 

please help me on this,

Thanks,

karishma.

 

Hi 

above code is to copy worknotes to another task wornotes.

try below code

 

var grScTask = new GlideRecord('sc_task');
grScTask.addEncodedQuery("request_item=" + current.request_item +"^sys_id!=" + current.sys_id);
grScTask.query();
while (grScTask.next()) {
    grScTask.short_description = "Worknotes from " + current.number + " : " + current.work_notes.getJournalEntry(1);
    grScTask.update();
}

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Did you get chance to check my answer?

If your issue is resolved now.

If yes, can you please mark appropriate response as correct for others who may have a similar question in the future and close this unresolved thread.

If not, please let us know if you need any other help


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Mahesh23
Mega Sage

Hi @karishmashaik ,

Try flow designer

find_real_file.png

 

find_real_file.png

 

 

find_real_file.png

 

Regards,

Mahesh