How can I stop additional comments from causing a loop in my bidirectional ServiceNow integration

ashutoshsha
Tera Contributor

I have successfully set up a bidirectional integration between two ServiceNow instances, dev248999 and dev247508. I can create and update incidents in both instances without any issues. However, when I try to pass additional comments from one instance to the other, the comments are being duplicated or creating a loop. I am attaching a notepad file with the business rule code of both instances for reference. Can you help me resolve this issue?

 

 

 
 
2 REPLIES 2

vikasverma1
Tera Contributor

i am also facing same issue

Sandeep Rajput
Tera Patron
Tera Patron

@ashutoshsha One way to address this issue is to make a GlideAggregate query on the Journal Entries (sys_journal_field) table and check if the exact same worknote was added in the last one minute. If the condition turns out to be true then you can current.setAbortAction(true) to abort such update.

 

Hope this helps.