You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When User Defined Rollups are converted to Customizable Rollups, we add their Opportunity field to multiple fields on the Rollup record. If an admin modifies this rollup to use another field via the Customizable Rollups interface (for example, a non-formula field), that field is updated on the Custom Metadata Type record, but may still be referenced on other fields on the Custom Metadata Type. As a result, these fields are being pulled into SOQL queries and slowing down calculations.
The Work Item will contain a link to my full investigation. For one org, I manually edited the affected CMTs and there was a noticeable performance increase in the scheduled jobs because unnecessary formula fields were no longer being queried. Rollups were also being grouped by Filter Groups much more efficiently (logs attached to Work Item).
STEPS TO REPEAT
Setup:
Create new fields on Opportunity:
Name: Gift Amount if Three Years Ago
Data Type: Formula
Formula Return Type: Currency (2 decimal places)
Formula: IF ( YEAR (CloseDate) = ( YEAR (TODAY()) - 3 ), Amount, NULL)
Name: Number of Gifts If Three Years Ago
Data Type: Formula
Formula Return Type: Number (0 decimal places)
Formula: IF ( YEAR (CloseDate) = ( YEAR (TODAY()) - 3 ), 1, NULL)
Create new fields on Contact:
Name: Gift Amount Three Years Ago
Data Type: Currency
Length: 16
Decimal Places: 2
Name: Number of Gifts Three Years Ago
Data Type: Number
Length: 18
Decimal Places: 9
Create User Defined Rollups using these formula fields (do not enable Customizable Rollups yet!).
Go to NPSP Settings → Donations → User Defined Rollups
Click New User Defined Rollup
Opportunity Field: Gift Amount if Three Years Ago
Rollup Operation: SUM
Target Object: Contact
Target Field: Gift Amount Three Years Ago
Create Rollup
Click New User Defined Rollup
Opportunity Field: Number of Gifts If Three Years Ago
Rollup Operation: SUM
Target Object: Contact
Target Field: Number of Gifts Three Years Ago
Create Rollup
Enable Customizable Rollups and View the converted User Defined Rollups.
Click the Contact: Gift Amount Three Years Ago Rollup. It has been converted with the following values:
1. Target Object: Contact
2. Target Field: Gift Amount Three Years Ago
3. Operation: Sum
4. Time Frame: All Time
5. Rollup Type: Opportunity → Contact (Hard Credit)
6. Filter Group: Opps: Won (HC)
7. Amount Field: Gift Amount If Three Years Ago
The Custom MetaData Type for that record looks like this (in Setup → Custom Metadata Types → Manage Records (next to Rollups). Note that the Field to Roll Up and Amount Fields both point to the Gift Amount If Three Years Ago field.
Click the Contact: Number of Gifts Three Years Ago Rollup. It has been converted with the following values:
1. Target Object: Contact
2. Target Field: Number of Gifts Three Years Ago
3. Operation: Sum
4. Time Frame: All Time
5. Rollup Type: Opportunity → Contact (Hard Credit)
6. Filter Group: Opps: Won (HC)
7. Amount Field: Number of Gifts If Three Years Ago
The Custom MetaData Type for that record looks like this (in Setup → Custom Metadata Types → Manage Records (next to Rollups). Note that the Field to Roll Up and Amount Fields all point to the Number of Gifts If Three Years Ago field.
Both of these rollups can be edited to use native Customizable Rollups functionality. Make the following edits and see what happens to the Custom Metadata Type records.
Go to NPSP Settings → Donations → Customizable Rollups. Click the Configure Customizable Rollups button.
Edit the Contact: Gift Amount Three Years Ago Rollup and change it to the following values:
1. Target Object: Contact
2. Target Field: Gift Amount Three Years Ago
3. Operation: Sum
4. Time Frame: Years Ago
5. Years Ago: 3 Years Ago
6. Rollup Type: Opportunity → Contact (Hard Credit)
7. Filter Group: Opps: Won (HC)
8. Date Field: Close Date
9. Amount Field: Opportunity: Amount
10. Save (now there are no references to the formula field on the Opportunity).
Changes were reflected on the Custom Metadata Type record, but the reference to the formula field remained in the Field to Roll Up field. (The Amount field was successfully changed).
Edit the Contact: Number of Gifts Three Years Ago Rollup and change it to the following values:
1. Target Object: Contact
2. Target Field: Number of Gifts Three Years Ago
3. Operation: Count
4. Time Frame: Years Ago
5. Years Ago: 3 Years Ago
6. Rollup Type: Opportunity → Contact (Hard Credit)
7. Filter Group: Opps: Won (HC)
8. Date Field: Opportunity: Close Date
9. Save (now there are no references to the formula field on the Opportunity).
Changes were reflected on the Custom Metadata Type record, but the reference to the formula field remained in both the Field to Roll Up and Amount fields:
The text was updated successfully, but these errors were encountered:
When User Defined Rollups are converted to Customizable Rollups, we add their Opportunity field to multiple fields on the Rollup record. If an admin modifies this rollup to use another field via the Customizable Rollups interface (for example, a non-formula field), that field is updated on the Custom Metadata Type record, but may still be referenced on other fields on the Custom Metadata Type. As a result, these fields are being pulled into SOQL queries and slowing down calculations.
The Work Item will contain a link to my full investigation. For one org, I manually edited the affected CMTs and there was a noticeable performance increase in the scheduled jobs because unnecessary formula fields were no longer being queried. Rollups were also being grouped by Filter Groups much more efficiently (logs attached to Work Item).
STEPS TO REPEAT
Setup:
IF ( YEAR (CloseDate) = ( YEAR (TODAY()) - 3 ), Amount, NULL)
IF ( YEAR (CloseDate) = ( YEAR (TODAY()) - 3 ), 1, NULL)
Enable Customizable Rollups and View the converted User Defined Rollups.
Click the Contact: Gift Amount Three Years Ago Rollup. It has been converted with the following values:
1. Target Object: Contact
2. Target Field: Gift Amount Three Years Ago
3. Operation: Sum
4. Time Frame: All Time
5. Rollup Type: Opportunity → Contact (Hard Credit)
6. Filter Group: Opps: Won (HC)
7. Amount Field: Gift Amount If Three Years Ago
The Custom MetaData Type for that record looks like this (in Setup → Custom Metadata Types → Manage Records (next to Rollups). Note that the Field to Roll Up and Amount Fields both point to the Gift Amount If Three Years Ago field.
Click the Contact: Number of Gifts Three Years Ago Rollup. It has been converted with the following values:
1. Target Object: Contact
2. Target Field: Number of Gifts Three Years Ago
3. Operation: Sum
4. Time Frame: All Time
5. Rollup Type: Opportunity → Contact (Hard Credit)
6. Filter Group: Opps: Won (HC)
7. Amount Field: Number of Gifts If Three Years Ago
The Custom MetaData Type for that record looks like this (in Setup → Custom Metadata Types → Manage Records (next to Rollups). Note that the Field to Roll Up and Amount Fields all point to the Number of Gifts If Three Years Ago field.
Both of these rollups can be edited to use native Customizable Rollups functionality. Make the following edits and see what happens to the Custom Metadata Type records.
Edit the Contact: Gift Amount Three Years Ago Rollup and change it to the following values:
1. Target Object: Contact
2. Target Field: Gift Amount Three Years Ago
3. Operation: Sum
4. Time Frame: Years Ago
5. Years Ago: 3 Years Ago
6. Rollup Type: Opportunity → Contact (Hard Credit)
7. Filter Group: Opps: Won (HC)
8. Date Field: Close Date
9. Amount Field: Opportunity: Amount
10. Save (now there are no references to the formula field on the Opportunity).
Changes were reflected on the Custom Metadata Type record, but the reference to the formula field remained in the Field to Roll Up field. (The Amount field was successfully changed).
Edit the Contact: Number of Gifts Three Years Ago Rollup and change it to the following values:
1. Target Object: Contact
2. Target Field: Number of Gifts Three Years Ago
3. Operation: Count
4. Time Frame: Years Ago
5. Years Ago: 3 Years Ago
6. Rollup Type: Opportunity → Contact (Hard Credit)
7. Filter Group: Opps: Won (HC)
8. Date Field: Opportunity: Close Date
9. Save (now there are no references to the formula field on the Opportunity).
Changes were reflected on the Custom Metadata Type record, but the reference to the formula field remained in both the Field to Roll Up and Amount fields:
The text was updated successfully, but these errors were encountered: