Skip to main content

I'm testing out an upgraded version of DLRS in our Sandbox and reviewing our setup. A consultant set up all of our scheduled DLRS under the older version of "Process Builder" which is now "Invocable by Automation" in more recent versions. These were never tied to a process builder or flow, only scheduled jobs. I'm trying to understand the difference between a scheduled job of "Watch for Changes" vs scheduled "Invocable...". Does Watch for Changes only pick up child records that are created or updated and Invocable is always a full recalculation?

3 réponses
  1. 6 août, 18:30

    Invocable by Automation means taking control of timing and change detection. Best used with Flows or Scheduled Recalculation. Invocable by Automation disables all the "proactive" parts of DLRS for that rollup. Something else has to tell is that it is time to recalculate. 

     

    People will often drive DLRS via Flow when they need advanced criteria to know when a record should force an update, or because they want to use an async path to cause the rollup to update. (usually faster than Watch for Changes) 

     

    Scheduled Recalculation isn't really a "mode" by itself. It is the bulk reconciliation process. Paired with Invocable by Automation means DLRS only recalculates when told and that recalculation is across the entire dataset, not focussed on only those records that need to change. You can also use this with other modes, such as Realtime. If my Relationship Criteria uses a related object or relative dates (such as THIS_MONTH) then I need a Scheduled Recalculation as a backup to run once in a while and make sure all the values are correct. Realtime and Scheduled can only evaluate records when they are saved, if the change is isolated to the formula logic, or driven by a related record, then DLRS doesn't notice. 

     

    Realtime is usually best for when a rollup value MUST always be correct. If that field ever didn't match the data in the system it could mean real harm for your business. For most people this isn't the case but it still gets used often because people think they want it. As you've already figured out, Realtime is the most likely to expose errors because it adds the most processing work during the original record save so if it has problem or encounters something like a validation rule then DLRS will prevent the child from saving. 

     

    Scheduled/Watch for Changes is great for focussed updates that don't need to be immediate. It doesn't need to process every record in the system but can still delay processing for the RollupJob. This helps to separate the work that needs to be done from the act of saving child records. For most people this is good enough. It gives fewer errors to end-users and updates the rollup value when it is convenient. I usually recommend running every hour but I know many people need every 15 minutes. It is about how long you can go without the number being correct. Because errors are moved to a background job it becomes important to monitor the DLRS Log object, that is where most problems from here or the Scheduled Recalculate will show up. 

     

    Hopefully that adds more detail and decision points. There are a lot of ways to reach your goal. Usually I would recommend using Watch for Changes unless you have a reason to do something else.

0/9000