Inheriting a Salesforce org from another administrator can be both freeing and frustrating. One major source of frustration we’ve seen recently? New admins logging into their new-to-them orgs, only to find that the previous admin enabled Custom Fiscal Years.
*cue melancholy music*
This is horrifying for a couple of reasons, mainly
1. Your organization does not have custom fiscal years. Say it with me: “My organization does not have custom fiscal years.” That’s right, if your organization’s fiscal year is a standard 365 days (no matter when it starts), then you do not need Custom Fiscal Year enabled. 2. Once you turn on Custom Fiscal Year, you can’t turn it off. Ever. Even Salesforce Support can’t turn it off for you. You’ll need to start a whole new instance of Salesforce. 3. All of your NPSP rollup fields that calculate donations based on Fiscal Year are invalid because they aren’t compatible with the Custom Fiscal Year setting.
In this example, a donation made on 2/1/2016 (February 1st, 2016) would be assigned as Fiscal Year 2016, while a donation made on 7/1/2016 (July 1st, 2016) would be assigned as Fiscal Year 2017.
Update the formula so the CASE function includes a line for every month in the calendar year before your fiscal year start. For example, this organization’s fiscal year starts on July 1 (7/1), so I included a CASE condition for months 1-6.
Create a currency field on the Contact to hold the sum of donations for a particular fiscal year (i.e. Sum of Donations FY2017). This is where the result of your DLRS rollup summary will go.
Next, create the Lookup Rollup Summary to sum the amount of all related Opportunities (Donations) that are Closed Won and fall in that fiscal year. The key is setting the Criteria: StageName = 'Closed Won' AND Fiscal_Year__c = 2017.
Similarly, if you want to count the number of donations in a particular fiscal year, you just need to create a number field on the Contact object to hold the amount and create a Lookup Rollup Summary where the Aggregate Operation is Count.
But what if I just want a field that calculates for THIS fiscal year?
The only way to automate that is with custom Apex code. However, you can “hack” a solution with DLRS by just updating the year specified in the Relationship Criteria to the current fiscal year. (You’ll just need to remember to update it each time a new FY rolls around.) Just remember to click Save and then Calculate when you update the year so all your Contact records get updated.