I want to copy the cause notes, problem fix notes and workaround from problem RCA task to Problem

Balakrishna_ABK
Tera Guru

"Cause notes" from RCA Task should be copied to  "cause notes" in Problem record
"Workaround" from RCA Task should be copied to  "workaround" in Problem record

"Problem fix notes" from RCA Task should be copied to "fix notes" in Problem record  

all above should be done when problem task is closed

 

Aoife
Tera Guru

Use an After or Async Busines Rule on the RCA Task table.  I'm not positive on the following field names, but the idea should work.

current.parent.cause_notes = current.cause_notes;
current.parent.workaround = current.workaround;

Aoife

Hi Aoife, can you send me the complete script for the same ?

(function executeRule(current, previous /*null when async*/) {

	var problem = new GlideRecord('problem');
	problem.get(current.problem);
	
	problem.cause_notes = current.cause_notes;
	problem.workaround = current.workaround;
	problem.fix_notes = current.fix_notes;
	problem.update();

})(current, previous);

find_real_file.png

View solution in original post

Thanks Aoife, its working.