Skip to main content

We'd like to test out some changes to have NPSP create the next installment for recurring donations.

 

When I create a partial sandbox, I see red error messages in the LEX components that there are no active schedules or upcoming installments. Additionally, if I manually create/close a related Opportunity, the Next Donation Date field clears and no future opportunity is created even though NPSP settings are set to auto-create the next installment. Components work fine in production.

 

According to this documentation, there is a 'protected' object called "Recurring Donation Schedule" that I cannot see in the Object Manager or select in a sandbox template, and the 'Next Donation Date' help/description text suggests it's set based on this mystery object.

 

What is this secret 'protected object' and can I push it to a partial sandbox in a way that will let me use standard Recurring Donation behavior for existing records?

 

@Nicholas Rustigian

 

Is it possible to seed a partial sandbox with functioning Recurring Donations?

7 respostas
  1. 18 de ago. de 2023, 09:19

    Hi @Duncan McGovern

     

    I no longer work with the nonprofit team, and I'm on parental leave at the moment, but I can answer this one. 

     

    For partial data sandboxes, or potentially even a full copy sandbox that is created using a sandbox template, Recurring Donation Schedule records are not created as part of the sandbox data seeding. This is a platform limitation with protected custom objects that is documented here (see the section at the bottom of the page): https://developer.salesforce.com/docs/atlas.en-us.packagingGuide.meta/packagingGuide/packaging_protected_components.htm

     

    This is why the LWC components indicate there is no schedule, because there are no schedule records. 

     

    Yes as the custom object is protected, you will not be able to see evidence of it within an org with NPSP installed (similar to protected Custom Settings etc). The only place you will see RD Schedules is in Storage Usage, or using the Data Export utility (though this is potentially a platform bug), however as you noted there are API's to access the data itself if needed.

     

    For reference, here's the object in GitHub: https://github.com/SalesforceFoundation/NPSP/tree/main/force-app/main/default/objects/RecurringDonationSchedule__c

     

    Personally, for this use case I would recommend using Snowfakery to seed RD and related data in a partial sandbox as once you have a template defined it can quickly populate seed data and is easily portable. 

     

    If you want to use the existing RD records that are seeded into the partial data sandbox during sandbox creation or refresh, then simply editing a schedule-impacting field on the RD records should trigger the creation of a new schedule i.e 

    - Effective Date

    - Amount

    - Installment Period

    - Day of Month

    - Installment Frequency

    - Payment Method

    - Status (in certain circumstances)

    - Campaign

     

     I've not tested this but I believe it should work. 

0/9000