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
Joe DoperalskiJoe Doperalski 

Flow Update Error: An error occurred at element fuSovContact (FlowRecordUpdate). UPDATE --- UPDATE FAILED --- ERRORS : (ALL_OR_NONE_OPERATION_ROLLED_BACK) Record rolled back because not all records were valid and the request was using AllOrNone header

An error occurred at element fuSovContact (FlowRecordUpdate).
UPDATE --- UPDATE FAILED --- ERRORS : (ALL_OR_NONE_OPERATION_ROLLED_BACK) Record rolled back because not all records were valid and the request was using AllOrNone header --- for SFDC record with ID :

Autolaunched Flow causing error I am unable to identify a pattern...

Consider the following use case:
When you put a case into a "resolved" status a time-based workflow fires and closes the case after 7 days.
When a case closes an email is sent to the contact, at the same time the contact is updated indicating the last time they were surveyed (eg. at case closure).
ProcessBuilder (detects a change in the case, eg it is closed) and Flow handles the email sending and contact update.

It would seem that the bulkification of Flow is not handling this situation correctly and throws the above mentioned error for no detectable reason.
------------------------------------------------------------------------------------------------------

Consider a simplified Process Builder + Flow created in a pretty bare development org:
ProcessBuilder calls flow everytime a case is updated.
Flow takes the case as input, looks up the contact associated with the case and updates the contact, setting a date/time field.  
(I am guessing the objects involved are not important, but the manner in which the bulkification occurs in salesforce when processing flow is...)


Consider the following data, rows 1-23.  These are cases that when updated will trigger the flow and recreate the exception scenario.  When I say "updated" I mean simply doing an update on the Case Id column to get the flow to fire and not actually changing any data...

Update rows 1-20 = success.
Update rows 1-21 = failure.
Update rows 1-19, 21 = success.
Update rows 1-20, 22 = success.
Update rows 1-20, 22, 23 = failure.
Update rows 1-20, 23 = success.

    CaseId                ContactId            ContactName
1    500i0000005M1gbAAC    003i000000W2jqIAAR    Babara Levy
2    500i0000005M1gaAAC    003i000000W2jqIAAR    Babara Levy
3    500i0000005M1gnAAC    003i000000W2jqPAAR    Edna Frank
4    500i0000005M1gdAAC    003i000000W2jqPAAR    Edna Frank
5    500i0000005M1gqAAC    003i000000W2jqBAAR    Jack Rogers
6    500i0000005M1grAAC    003i000000W2jqBAAR    Jack Rogers
7   500i0000005M1gkAAC    003i000000W2jqFAAR    John Bond
8    500i0000005M1glAAC    003i000000W2jqFAAR    John Bond
9    500i000000d9FFBAA2    003i000003dL7FmAAK    Johnnyt Slick
10    500i000000d9FG9AAM    003i000003dL7FmAAK    Johnnyt Slick
11    500i000000dqVOWAA2    003i000003dL7FmAAK    Johnnyt Slick
12    500i0000005M1gvAAC    003i000000W2jqHAAR    Lauren Boyle
13    500i0000005M1gwAAC    003i000000W2jqHAAR    Lauren Boyle
14    500i0000005M1giAAC    003i000000W2jqOAAR    Liz D'Cruz
15    500i0000005M1gmAAC    003i000000W2jqOAAR    Liz D'Cruz
16    500i0000005M1gpAAC    003i000000W2jqAAAR    Sean Forbes
17    500i0000005M1goAAC    003i000000W2jqAAAR    Sean Forbes
18    500i0000005M1guAAC    003i000000W2jqGAAR    Stella Pavlova
19    500i0000005M1gsAAC    003i000000W2jqGAAR    Stella Pavlova
20    500i0000005M1gtAAC    003i000000W2jqGAAR    Stella Pavlova
21    500i0000005M1gZAAS    003i000000W2jqGAAR    Stella Pavlova
22    500i0000005M1gfAAC    003i000000W2jqEAAR    Tim Barr
23    500i0000005M1geAAC    003i000000W2jqEAAR    Tim Barr

 
David Catindoy 101David Catindoy 101
The reason why you are receiving this kind of flow error is because maybe you are trying to update records that is invalid already. What I mean by invalid is that it was invalidated due to a new validation rule added recently for example. I have encountered the same error before when trying to update all related child cases when the parent consignment field was updated. My suggestion is you try to create a new record with new associated child records as well and see if the error still persist.
Joe DoperalskiJoe Doperalski
Thanks for the response David, but I don't think you actually looked at the details of my post.  Depending on the combination of data being updated sometimes the SAME data is successful and sometimes it fails.  Eg. I'm updating the contact related to the case.  Your explanation does not explain why the following happens:

Update rows 1-20, 22 = success.
Update rows 1-20, 22, 23 = failure.
Update rows 1-20, 23 = success.