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

Scheduled Flow returning no-op after successfully retrieving records. #614

Closed Fdhomont closed 3 months ago

Fdhomont commented 3 months ago

I'm trying to imitate the full recalculation that can be triggered via the ui.

Looking through the log, the records are being retrieved but no processing is done.

jamessimone commented 3 months ago

Do you have a Calc Item Where Clause? The only reason there would be a no-op is if none of the children passed to the action matched. Happy to help in any way I can, but it might take looking through logs to truly identify what the issue is!

Fdhomont commented 3 months ago

Thanks for your reply.

There is a Calc Item Where Clause, it should be letting records through. I matched that where clause in the Get Records element in flow to be certain, the debug showed that some records were being passed through. I think the strangest thing is that this works from the app or when called via runFromTrigger() in Apex.

jamessimone commented 3 months ago

What's the where clause? There are some subtle differences between the parsing for SOQL and for Apex Rollup which might be coming into play - make sure there are spaces between each word and that your field API names are cased correctly. That it's working from the app suggests you've done that, but it never hurts to make sure.

Let me know if you can send over a debug log from the scheduled run, or how else I can assist!

Fdhomont commented 3 months ago

Thanks for your help, for now I've got it working by calling runFromApex.