How to add work notes and activity history of an other table?

Felix20
Mega Guru

Hallo everybody,

I have a requested item workflow with catalog tasks.

I want to show Work notes from the requsted items on my catalog tasks. The requested item is already referenced in the catalog tasks so how to show the work note field + activities + post button and so on from the requsted item on my catalog tasks?

Best regards

4 REPLIES 4

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

you can write a business rule on RITM. Before update insert BR.

Condition:

Whenever work notes changes.

Script:

var gr = new GlideRecord('sc_task');

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

gr.query();

while(gr.next()){

gr.work_notes= current.work_notes;

gr.update();

}

 

Thanks,
Ashutosh

Hi Ashitosh, good hint, thanks, works perfectly after some getJournal... things. But know I also want to sync comments that a customer does from the RITM to my open catalog task. The problem there is, that both will have a business rule which reacts on an update of comments and work_notes fields. Cyclical updates. What is the best practice to break the cycle? Best regards

Ashutosh Munot1
Kilo Patron
Kilo Patron
https://community.servicenow.com/community?id=community_question&sys_id=4f8bc761db9cdbc01dcaf3231f961932 Check this as well

This is my favourite. https://community.servicenow.com/community?id=community_question&sys_id=7e51172ddbdcdbc01dcaf3231f9619e5