Work notes from Incident

SG23
Tera Expert

Hi guys, I have a scenario where to get all the work notes from the parent (Incident) to Inc task when a Inc task is created. For this I have written Before Insert BR on Inc task but it is not working.

 

 

 

 

Also need to get latest work notes added by user only from Incident to Incident task (from OOB it's again going to Incident work notes). Please suggest. Thanks.

2 REPLIES 2

Allen Andreas
Administrator
Administrator

Hi,

Unfortunately, your last line of your post above adds a confusion piece to this. You already said you're getting ALL the work notes from the parent Incident to the Incident Task when the task is created. So you'd already have them...I think you mean any new work notes after that initial load? Please provide more information and try your best to say it clearly for those of us without the context you have so that we can understand.

 

For the first part, getting all the work notes, can you double-check the actual field used on the incident task that relates it to the incident record? Out of box, that field is called simply "incident"....so current.incident.work_notes.getJournalEntry(-1);

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

rahulkothari
Tera Contributor

Hi @SG23 ,

Please try current.work_notes = current.source_record.comments_and_work_notes.getJournalEntry(-1);

I tried for child incident and used below code, worked perfectly. Attached screenshot

current.work_notes = current.parent_incident.comments_and_work_notes.getJournalEntry(-1);

 

rahulkothari_0-1677649259341.png

 

Please mark answer correct if it is helpful.