function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Simon KinderSimon Kinder 

Issue with Scheduled flow failed to update records

Hi all

Some assistance.

I have a flow that i have copied to be a scheduled flow under the new functionality in Winter 20. When run from a button the original flow works to calculate the values from various work orders and pass this total to the parent service contract. When run from a button this works fine.

So i have copied this flow and added to schedule. See screenshots below as for start config.

User-added imageI pass in all service contracts as the first step in the flow is to look up all work orders with the this service contract id.

User-added image
After various actions the flow writes values back the service contract. This is where it fails, the last step and i get massive spam from SF as it fails for all contracts as far as i can see.

Screenshot of final failure example

User-added image

As you can see it has valid data for each field to update, a valid service contract id (i can run the none scheduled version and get success with identical id and values) but it fails.

Any suggestions? The inability to debug scheduled flows is a real pita as to test i have to run the entire batch everytime....

 
vijay kumar kvijay kumar k
Hi Simon

Your getting null error while flow doing update.so kindly check your debug logs with putting filter value finest at workflow. And reschedule your flow next one hour. After hour the flow execute as usual with creating debug logs.

Try to share screen shot of flow execution part in debug log record here. So any one can help you on time
For putting debug logs, go to setup>debug log>edit timeings or create new with new time line.
Regards
Vijay
Simon KinderSimon Kinder
Thanks Vijay for responce.

The logs are long, some snippets below

Start of log, starts inteval with each record

User-added image

Further on when it changes, seems to be working fine and running the first element of the flow for each interval

User-added image
Further again
User-added image
All seems to work correct and it might suggest some of the contracts are working fine. As this interval end |48 appears?

Looking at the fails (from the end of the log)

Some null errors as you mentioned

User-added image

run out of screenshots i can attach, but there are also so runs where it hit the DML limit, which suprises me, but there must be some wierd contracts.



 
vijay kumar kvijay kumar k
Hi Simon

The Posted screenshots are not clear. So will do one thing the error meaning is the flow is tried to update records but update element is null (no records are there to update).
So i"m suggesting you runn flow manually from flow builder with required inputs.
Go to flow builder click on the debug and it will redirect to run page the flow may ask input values if asks give your inputs and click next.The flow result give right side. Observe all elements are run with expected way or not.

Update me. If stilll u not getting will connect and resolve over the call only.

Regards 
Vijay 
Simon KinderSimon Kinder
Hi Vijay

Thanks again.

I actually resolved this. While talking to some guys on discord i noticed that the flow name is NOT the scheduled flow that is the error in most cases. It was the actual button triggered version (which also trigger on field editing via process builder). The naming of the flows is identical appart from one saying nightly in the name). So what was happening is

The Scheduled flow was running and during the run it was triggering the process builder flow which was giving the errors. Why ? No idea as i thought all field updates were only performed at the end of the flow, not mid flow.

The majority of errors were from the process builder triggered flow. Only two error messages were actually related to the scheduled flow (null errors from really old service contract records).

I tested again by turning off the process builder trigger on edit flow and the scheduled flow ran perfectly appart from the two null errors. So all resolved i guess.

Thanks for the help.
 
vijay kumar kvijay kumar k
Hi Simon

Finally, your flow running successfully.

Try to find a permanent solution in the initial stage only. If one day you want to activate that process builder again your flow fails right.
Vishnu Vardhan Reddy BijivemulaVishnu Vardhan Reddy Bijivemula
Hi Simon
In Flows ,Schedule Trigger flow I executed the relate Case status Update. but in Scheduled jobs the Started time is not displaying and record are not updating why

please help me