Copy activity log from task to parent

samadam
Kilo Sage

I am trying to copy activity log from task to parent how can I do that. I can copy work notes and comments but I want to copy any other field changes captured in activity log to the parent. Trying with  a before BR and unsure how to get activity log entries.

2 REPLIES 2

Samaksh Wani
Giga Sage

Hello @samadam 

 

You need to write a Business Rule Script :-

 

var gr = new GlideRecord('incident');


      gr.addQuery('sys_id',current.parent.sys_id);


      gr.query();


      if (gr.next()) {


              var comments = gr.comments.getJournalEntry(-1);


              current.comments = comments;


              //gs.addInfoMessage('Old log:' + comments);


      }

 

Plz mark my solution as Accept, If you find it helpful.

 

Regards,

Samaksh

I can do comments and work notes but wondering if capturing the activity log from task to parent is possible