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
219 stars 30 forks source link

Rollup Setting Value, Then Resetting it to N Immediately After #577

Closed pranavparakh7 closed 3 months ago

pranavparakh7 commented 6 months ago

Hello James,

We have an object with multiple rollup fields (Contributions, Misc. Receipt, Total Expenses, etc). We have setup custom metadata for these rollup fields. One such field is Contributions (added image below)

Screenshot 2024-04-03 at 4 53 29 PM

After enabling field history tracking, we observed that these values are calculated once and set to blank/null immediately. In certain cases (Contributions) these are being recalculated multiple times. Please refer below.

Screenshot 2024-04-03 at 4 40 58 PM

Any help in identifying the root cause or directions to debug this would be really helpful.

Regards, Pranav

jamessimone commented 6 months ago

@pranavparakh7 have you tried updating a record with the Salesforce Developer Console/an active TraceFlag on and the "Is Rollup Debug Logging Enabled" checkbox set to true on the Org Default Rollup Control CMDT record? You should get a log generated - you can also update the "Should Run As" picklist on the rollup control record to be Synchronous, which will allow all of the rollup details to be shown in one single log file.

Here's a few things I look for when it comes to debug logs: