SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
683 stars 235 forks source link

Add Asyncronous Processing Mode #1471

Closed matt-ascendably closed 1 month ago

matt-ascendably commented 1 month ago

In real time mode, if updates to a child object trigger an update to a parent, and the parent record can't save for any reason (validation rule, user permissions, etc.) the child object record save fails.

I would like to see a system-mode asynchronous processing mode. It would change the order of execution so that the child record saves first, and then the parent update is queued up and runs (similar to the asynchronous path in Flow).

This would reduce save errors encountered by users, and also enhance system performance.

aheber commented 1 month ago

@matt-ascendably thank you for the suggestion. I'm going to close this because we have some issues already requesting similar features, such as #1273.

That said, I think you may want to look at the currently available "Scheduled" calculation mode. This does much of what you're looking for, it determines need for recalculation in realtime but creates a Scheduled Item record to be processed by a Scheduled Job at a future time. How often that Scheduled RollupJob class runs is up to you.

We do have some interest is something closer to the Flow's Async paths, so they is still a separate transaction but doesn't wait for a scheduled job to pickup the work. We are investigating that but don't have immediately plans. Some are looking at Change Data Capture and others at using Platform Events.

I hope you're able to make the Scheduled path work, if you find it doesn't I'd encourage you to post in the Trailblazer Community group for DLRS to get any needed help.