Loading

"UNABLE_TO_LOCK_ROW" error occurs when merging duplicate contacts in NPSP

Veröffentlichungsdatum: Jun 17, 2026
Beschreibung

When merging duplicate contact records in an NPSP org, users may encounter the following error: 

 

"Error: System.DmlException: Merge failed. First exception on row 0 with id 00XXXXXXXXXXXXXXXX; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []"

 

This issue occurs specifically when:

  • One or both contacts were recently created through a live application process (e.g., an online intake form or automated data import running concurrently).
  • The merge operation attempts to acquire a record lock on a contact that is simultaneously being modified by an active transaction (e.g., a Flow, trigger, or batch job writing to the same record or its related records).

This error does not indicate data corruption. It is a transient locking conflict caused by competing database transactions.

Lösung
  1. Retry the merge after a delay. Wait until the application process or batch job that created or last modified the record has completed. In most cases, retrying the merge 5–15 minutes later resolves the issue.
  2. Merge during off-peak hours. If the application process runs continuously, schedule merge operations for a time when form submissions and automated processes are less active.
  3. Review NPSP TDTM triggers. If the error persists, check whether NPSP TDTM (Trigger Dispatch and Table Management) handlers are writing to related records (e.g., Households, Allocations, Rollups) on the same contacts during the merge window. Temporarily disabling non-critical TDTM handlers during a bulk merge operation may help.
  4. For recurring locking issues: Contact Salesforce Support to investigate whether a specific automation, integration, or NPSP batch job is holding locks on contact records longer than expected.
Nummer des Knowledge-Artikels

005386855

 
Laden
Salesforce Help | Article