-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RollupService fails on Nonprofit Cloud's standard 'Program' object #1396
Comments
I created an unmanaged org and reproduced the bug there. The reason this fails is that the RollupDmlGuard and RollupDmlGuardTest classes are still at v56.0. Until this is fixed, no objects released in v57.0 or later will be compatible. |
I tested this update - it fixes the bug! |
Fantastic find! Rather than only updating the API versions, I'd like a chance to fix whatever it is in RollupDmlGuard that is making it API dependent. We've been slowly trying to make DLRS support objects that are ahead of it's API version so we don't have problems like this. I'd like to close this gap as well. Can you provide reproduction steps or if you're so inclined, take a look at the class and give us a starting point for which parts seem to be causing the problem? |
Included in beta release 2.20 (Beta 1) |
Included in production release 2.20 |
Describe the bug
When rolling up from a custom child object to the Nonprofit Cloud's standard 'Program' object, either via the child trigger or using the scheduled rollup job, the following Apex error occurs:
dlrs.RollupService.triggerHandler(Schema.SObjectType)
FATAL_ERROR|System.QueryException: sObject type 'Program' is not supported.
To Reproduce
Steps to reproduce the behavior:
System.QueryException: sObject type 'Program' is not supported.
Expected behavior
This rollup works when running "Full Calculate" - it should also work with Realtime triggered calculations or scheduled rollups.
Additional context
The rollup works perfectly when we click Full Calculate - in other words, there's no problem with the aggregate query that is used by the rollup. The error occurs in a subsequent step - I assume it is when the DLRS code in RollupService tried to query or update the Program object.
Here is the actual query that it runs to do the rollup:
SELECT Target_Program__c, Count(Id) lre0 FROM Referral__c WHERE Target_Program__c in ('11WDp000000L04lMAC') AND (Referral_Date__c = LAST_N_DAYS:365) GROUP BY Target_Program__c
DLRS is running in v58.0 - I tried running my trigger in both 58.0 and 59.0 with the same result. I also tried running with User and System sharing mode with the same result.
Note that I also tried changing Calculation Mode to Scheduled. When the rollup service ran on schedule, it hit the same error as the triggered rollup. However, the Full Calculate still works fine.
I have no way of figuring out where the error occurs in the package, but in general I suspect two possible issues with the Nonprofit Cloud 'Program' object.
The text was updated successfully, but these errors were encountered: