Business rule fired twice on a single update of the record


Description

A business rule ran twice on a single update of the record. Also, the first time it ran the current.operation() returns update but during second execution the current.operation() returns null.

Cause

The business rule that got executed twice was configured to run whenever a particular field is changed.

From the audit history of the record, it was clear that the value of this field got changed twice in one single update, because of which the business rule got fired twice.

The value of this field got changed twice because there was two current.update() being made in one single transaction.

The first one was present inside "Save" UI action and the second one was present inside an OOB script include which was being called from a custom business rule that got triggered during the "Save" operation.

Resolution

The issue of business rule firing twice got resolved after deactivating the other custom business rule, so you have to avoid double updates happening in single transaction