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

Multiple Rollup Control Records #525

Closed jamessimone closed 10 months ago

jamessimone commented 10 months ago

Discussed in https://github.com/jamessimone/apex-rollup/discussions/522

Originally posted by **louisskelton** October 19, 2023 Hello! I was wondering if there were any particular considerations around using multiple Rollup Control records. I'd like some processes to be processed synchronously and others in an async queueable context. Initially it made sense for me to create 2x Rollup Control records for this purpose. In my testing this sometimes breaks things... for example if a child object has 2x rollups - one synchronous and one queueable (different parent objects) the queueable rollup won't fire. I'm guessing from this that we should ensure that our Rollups aren't distributed across Rollup Controls such that child objects are used by more than one Rollup Control - is that right? And if so, what other rules / guidance should we follow when structuring the Rollup Control records and their associated Rollups? Thanks so much :)