Push sc task worknotes to RITM worknotes

 if necessary, personalise the form and add in work notes

then code an update business rule on sc_task (after update ideally; may need to be before update depending on the rules running on RITM):


(function executeRule(current, previous /*null when async*/ ) { if (!gs.nil(current.work_notes)) { var grRITM = new GlideRecord('sc_req_item'); if (grRITM.get('sys_id', current.request_item)){ grRITM.work_notes = 'Work notes update on task ' + current.number + ': ' + current.work_notes; grRITM.update(); } } })(current, previous);

Comments

Popular posts from this blog

Running transform maps asynchronously

GlideRecord setValue

Post a command to the ECC queue for the mid server to initiate a powershell file copy