Loading

Deleting an Account Clears the Donor Lookup on Gift Transaction but Is Blocked on Gift Commitment in Nonprofit Cloud

Veröffentlichungsdatum: Jul 29, 2026
Beschreibung

When an Account is referenced by a Gift Commitment, attempting to delete the Account is blocked with the error:

This account is referenced on gift commitments and can't be deleted.

When an Account is referenced only by a Gift Transaction (through the Donor lookup, DonorId), the Account deletes successfully and the Gift Transaction is retained with its Donor lookup cleared, leaving what appears to be an orphaned transaction.

Root cause:

  1. On Gift Commitment, the Donor field (DonorId, a lookup to Account) is required. On Gift Transaction, the Donor field (DonorId, a lookup to Account) is optional (nillable).
  2. Salesforce lets you configure one of three delete behaviors for a lookup relationship only when the lookup field is optional: clear the field value (default), block deletion of the referenced record, or cascade-delete (custom-to-custom only).
  3. Gift Transaction (optional Donor) uses the default "clear the value" behavior, so deleting the Account empties DonorId and keeps the transaction.
  4. Gift Commitment (required Donor) cannot have its value cleared, so the platform blocks the Account deletion to preserve referential integrity, producing the error above.

The two objects are not behaving inconsistently; the same lookup-delete rule is applied consistently to a required field versus an optional one. Field definitions were confirmed against the customer org (API v62): GiftTransaction.DonorId nillable = true, GiftCommitment.DonorId nillable = false, both with cascadeDelete = false and restrictedDelete = false. No custom triggers, flows, or validation rules are involved.

Lösung

No fix is required; the behavior is by design. If you would prefer that deleting an Account be blocked when Gift Transactions reference it (rather than clearing the Donor lookup), change the delete behavior of the optional Donor lookup:

  1. Go to Setup, open Object Manager, and select Gift Transaction.
  2. Open Fields & Relationships and select the Donor (DonorId) field.
  3. Edit the field and, under the lookup delete behavior options, choose "Don't allow deletion of the lookup record that's part of a lookup relationship."
  4. Save. Account deletions that reference a Gift Transaction will now be blocked, matching the Gift Commitment behavior.

This is a supported configuration option on an optional lookup and does not change the required/optional nature of the field itself.

Nummer des Knowledge-Artikels

005390226

 
Laden
Salesforce Help | Article