jamessimone / apex-rollup

Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.
MIT License
212 stars 30 forks source link

System.SObjectException: SObject row was retrieved via SOQL without querying the requested field #445

Closed pyao-bwc closed 1 year ago

pyao-bwc commented 1 year ago

I upgraded from 1.5.53 to 1.5.66 and one of our tests breaks with this exception: 05:52:24.438 (20410746673)|FATAL_ERROR|System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Utility_Account_Subscriptionc.Opportunityr Class.RollupRelationshipFieldFinder.areParentFieldsAlreadySet: line 752, column 1 Class.RollupRelationshipFieldFinder.getFullRecalcParents: line 729, column 1 Class.RollupRelationshipFieldFinder.getParents: line 189, column 1 Class.RollupAsyncProcessor.getCalcItemsByLookupField_rMap$$lString$$cRollup$$dCalcItemBag$$r_0RollupAsyncProcessor_1Set$$lString$$r: line 832, column 1 Class.RollupAsyncProcessor.process_rvoid_0List$$lRollupAsyncProcessor$$r: line 658, column 1 Class.RollupAsyncProcessor.performWork: line 345, column 1 Class.RollupAsyncProcessor.QueueableProcessor.execute: line 434, column 1

I downgraded to 1.5.63 and the test worked, so it looks like a more recent change caused this?

Here is the debug log at 1.5.66: debug log.txt

jamessimone commented 1 year ago

@pyao-bwc just released a version that should help you with this

pyao-bwc commented 1 year ago

Thanks, that did it!

jamessimone commented 1 year ago

No problem, glad to hear it!