Infinite loop of business rules!

Mazin AliKarar
Mega Expert

Dear all,

Last night, I found myself reaching a point where I am writing two business rules that get triggered when 2 different fields change. But within each BR, the script will go and edit the other BR's field.

More clearly:

BR1: When Field1 changes .. in the script, it changes Field2.

BR2: When Field2 changes .. in the script, it changes Field1.

So triggering any of the 2 BRs will call the other one in an infinite loop fashion.

The two scripts eventually stopped working. But, out of curiosity, I just wanna know how ServcieNow deals with such an issue.

Thanks and best regards,

1 REPLY 1

Ravi Kiran6
ServiceNow Employee
ServiceNow Employee

Hi Mazin,



I would suggest you to create a   bool field (true/false) and use it as a flag.


Do a flag check before running the business rule, once you   update the record update the flag as well.



This process will stop the infinite BR run.