Scheduled Flow returning no-op after successfully retrieving records.
Closed this issue · 4 comments
I'm trying to imitate the full recalculation that can be triggered via the ui.
- All the custom metadata is already in place
- I'm calling the mdt-based rollup action
- Providing the object in question to both fields in the Select Objects section
- Rollup context = REFRESH (have also tried INSERT, UPSERT, and UPDATE)
- Providing records previously retrieved in the flow to "Records to rollup"
- No other options selected
- Calling Process Deferred Rollups
- RollupFlowBulkProcessor Outputs: message (SUCCESS), isSuccess (true)
Looking through the log, the records are being retrieved but no processing is done.
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!
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.
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!
Thanks for your help, for now I've got it working by calling runFromApex.