Loading

Enhanced Recurring Donations validator fails with NullPointerException

Julkaisupäivä: Sep 17, 2026
Kuvaus

When running the Enhanced Recurring Donations validator in NPSP Settings ahead of migrating from Legacy to Enhanced Recurring Donations, some Recurring Donation records can fail with: "npsp.TDTM_RecurringDonation: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object." This occurs specifically on Recurring Donations that have no associated npsp__RecurringDonationSchedule__c record. During validation, RD2_RecurringDonations_TDTM builds a map of Recurring Donation Id to its related Schedule records; for a Recurring Donation with zero matching schedules, that lookup returns null, and NPSP's RD2_ScheduleService.PauseScheduleHandler.hasActivePause() method does not check for null before using the list, throwing the exception. This has been confirmed to occur independent of record Status (both Active and Lapsed records can be affected) and independent of any custom Installment Period configuration — the common factor is the missing Schedule record, not the data on the Recurring Donation itself.

Ratkaisu
  1. Export the npsp__Error__c records generated by the failing validation batch and cross-reference them against your Recurring Donation records to identify every record hitting this specific NullPointerException.
  2. For each failing Recurring Donation, confirm whether an npsp__RecurringDonationSchedule__c record exists for it. Records with no associated Schedule record are the ones affected by this issue.
  3. If feasible, enable FINEST-level Apex debug logging on the validation batch's running user and re-run Validate Migration in a sandbox first — this captures the exact record and line of failure (hasActivePause() called from preventScheduleChangePausePaused(), inside the npsp.TDTM_RecurringDonation trigger) for confirmation.
  4. This is a gap in the managed package's null handling rather than a data configuration issue, so a permanent fix requires an NPSP engineering update. In the meantime, engage Salesforce Support with the record IDs and npsp__Error__c details for further diagnosis and to check for an available patch or workaround.
  5. Always perform Validate Migration in a sandbox first when working through a batch of these errors, to avoid generating unnecessary error records against production data.
Knowledge-artikkelin numero

005460250

 
Ladataan
Salesforce Help | Article