Business Rule getting in to infinite loop when using asyn as when to run condition

Reeve Lobo1
Kilo Contributor

Hi

The business Rule condition for when to run was set to async on update and insert mean while in the script there is a condition if true the work notes are updated the problem i was facing is the when the if condition was true the business rule goes on an infinite loop of updating the the record work notes. I tried methods like current.setWorkflow(false); and

current.setAbortAction(true); but didnt have any luck with both methods it would be great if some one could help me understand what needs to be done to stop my business rule from looping again the if condition and when to run.

Thank you

2 REPLIES 2

Anshu_Anand_
Kilo Sage
Kilo Sage

3 factors to check in your BR:-

  1. Condition field of your BR . when will be the BR gets executed. if its empty then everytime update/insert is there BR will execute.
  2. Fields you are updating. there is chances that when a certain field is getting updated, that field could have been used as a trigger of another BR creating a loop. check the fields, only necessary fields needs to be updated .
  3. Don't use update() method in script if your updating currentrecord.

If you share some more context/screenshot/script , then we can help

 

Regards,
Anshu

Thank You For responding so quickly yes will try to share more details.