Business Rule getting in to infinite loop when using asyn as when to run condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 07:48 AM
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
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 08:46 AM
3 factors to check in your BR:-
- Condition field of your BR . when will be the BR gets executed. if its empty then everytime update/insert is there BR will execute.
- 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 .
- Don't use update() method in script if your updating currentrecord.
If you share some more context/screenshot/script , then we can help
Anshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2022 08:58 PM
Thank You For responding so quickly yes will try to share more details.