SELF_REFERENCE_FROM_TRIGGER
A trigger tried to update or delete a record that is already being processed by a trigger in the same transaction.
Common causes
- An after trigger runs DML on the same records it is processing.
- A trigger on object A updates object B, whose trigger updates A again.
- A before delete trigger tries to update the record being deleted.
How to fix
- To change fields on the triggering record, set them in a before trigger with no DML:
trigger AccountTrigger on Account (before update) {
for (Account a : Trigger.new) {
a.Description = 'Updated'; // no update statement needed
}
}
- Break circular updates with a static flag that prevents the second pass.
- Review flows and triggers on both objects together to see the full chain.