Work Notes Updating 3 times in a Row under RITM

John Vo1
Tera Guru

Can someone help me out and see when someone updates the work notes and changes the state it updates the RITM 3 times in a row.

find_real_file.png

I open a ticket with SN and they told me it was a business rule I created called Work Notes to RITM.   Can someone take a look at this business rule and see what's causing the work notes to update more than once on a RITM

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Here is a snapshot of our business rule, running on sc_task to push worknotes to the RITM:



find_real_file.png



find_real_file.png



We have nothing set on the "Actions" tab. Hope that helps. I just tested this rule and it's working in our instance.


View solution in original post

17 REPLIES 17

Can you tell me what's the difference between my script and yours?   I can see the code is different but why is mines duplicating?


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



var ritm = new GlideRecord('sc_req_item');


if (ritm.get(current.request_item)) {


        ritm.work_notes = current.work_notes.getJournalEntry(-1);


        ritm.update();


}




})(current, previous);


If you're still seeing a duplication, then you should check other business rules on the sc_req_item table where you might be doing a current.update() in the script. It might be that the duplication comes from another business rule.


The script you gave me and the snap shot worked.   It stopped the duplication.   I was just making sure something in my script wasn't causing it.



Thanks again Kristen!!!