0

So, I have a fairly large process here that I am working on that includes two Process Builders and a Visual Flow. While testing this process I am getting the An unhandled fault has occurred in this flow error.

Process 1. When a Buyers_Order__c gets marked signed (Picklist Field), it will update all of the associated Cap_Cost__c records (Updating a checkbox to true). Then the second Process will Kick off on any Cap_Cost__c that is modified to have that checkbox checked. The second process will simply just call the flow which is step 3. I am passing two variables into that flow, BuyersOrderID and VinNumber.

The flow will take the variables that were passed in and do a fast lookup to find any Cap_Cost__c records that the BuyersOrderID is not equal to the one passed in AND the VinNumber is the same as the one that was passed in.

It will then loop through all of the records that were found and update a checkbox (Needs_Removed_Or_Modified__c) on them to true.

Based on the below error message that I am receiving in my email, I believe that all of this is working up until the point where it tries to update that final record checkbox. Please let me know if you need to see any screenshots or need any further insight to this process.

Error element Update_Cap_Cost_Needs_Removed_Checkbox (FlowRecordUpdate).
The flow tried to update these records: null. This error occurred:
CANNOT_EXECUTE_FLOW_TRIGGER: The record couldn’t be saved because it failed
to trigger a flow. A flow trigger failed to execute the flow with version ID
30136000000JFoF. Flow error messages: An unhandled fault has occurred in
this flow

An unhandled fault has occurred while processing the flow. Please contact
your system administrator for more information. Contact your administrator
for help.. For details, see API Exceptions.

________________________________________
This report lists the elements that the flow interview executed. The report
is a beta feature.

We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: UpdateCapCostToNeedsRemovedForTrucksSoldByAnotherRep
Type: Autolaunched Flow
Version: 9
Status: Active

Flow Interview Details
Interview Label: UpdateCapCostToNeedsRemovedForTrucksSoldByAnotherRep
4/7/2017 10:38 AM
Current User: Concept Services (0053600000306H9)
Start time: 4/7/2017 10:38 AM
Duration: 1 seconds

How the Interview Started
Concept Services (0053600000306H9) started the flow interview.
Some of this flow's variables were set when the interview started.
BuyersOrderID = a023600000LQfSYAA1
VinNumber = TESTUNIT813515
FAST LOOKUP: FindCapCostRecords
Find all Cap_Cost__c records where:
VIN__c Equals {!VinNumber} (TESTUNIT813515)
Buyers_Order__c Does not equal {!BuyersOrderID} (a023600000LQfSYAA1)
Assign those records to {!CapCostsNeedingRemoved}.
Save these field values in the variable: Id
Result
Successfully found records.

DECISION: Cap_Cost_Found
Executed this outcome: CapCostWasFound
Outcome conditions: and
1. {!CapCostsNeedingRemoved} ([a063600000BhyXJAAZ]) Is null false
Logic: All conditions must be true (AND)

LOOP: Loop
Loop Through: [a063600000BhyXJAAZ]
Iteration: 0
Current value of {!CurrentCapCostID}: a063600000BhyXJAAZ

RECORD UPDATE: Update_Cap_Cost_Needs_Removed_Checkbox
Find all Cap_Cost__c records where:
Id Equals {!CurrentCapCostID.Id} (a063600000BhyXJAAZ)
Update the records’ field values.
Needs_Removed_Or_Modified__c = true
Result
Failed to update records that meet the filter criteria.

________________________________________
Error Occurred: The flow tried to update these records: null. This error
occurred: CANNOT_EXECUTE_FLOW_TRIGGER: The record couldn’t be saved because
it failed to trigger a flow. A flow trigger failed to execute the flow with
version ID 30136000000JFoF. Flow error messages: An unhandled fault has
occurred in this flow

An unhandled fault has occurred while processing the flow. Please contact
your system administrator for more information. Contact your administrator
for help.. For details, see API Exceptions.

________________________________________
________________________________________
Salesforce Error ID: 707104115-31271 (-553726213)

Record Update Screenshot

6
  • 1
    Agree looks like it's making it to the step to update the checkbox on the cap cost. Can you include a screenshot of the record update?
    – gorav
    Apr 7, 2017 at 22:41
  • Added in the Screenshot
    – cmmoutes13
    Apr 10, 2017 at 13:14
  • 1
    Looks like it should work. If you've tried all the sensible solutions, try saving the flow as a new version, and if that fails as a new flow. It really shouldn't change anything, but I've seen it work.
    – Kasper
    Apr 11, 2017 at 22:03
  • Just tried that and it still is not working. Same error as before
    – cmmoutes13
    Apr 12, 2017 at 12:32
  • Have you tried looking at the last few lines of the logs before it errors out? I believe you could get this error from a trigger failing or a validation rule.
    – brezotom
    Apr 12, 2017 at 18:49

3 Answers 3

4
+50

In general, the flow/process builder error handling is suck, and this issue hopefully will be enhanced by SF in future.

Regarding your flow, it is not clear why you doing update inside the loop? You should: 1.Retrieve all records into collection 2.Assignment inside the loop - Needs_Removed_Or_Modified__c = true 3.Update the collection

Not sure if it will solve the issue. If not, try isolating the problem - try running only the flow for specific record by passing the parameters in the URL(try with different records). -Try disabling specific steps in the flow - by playing with the arrows - to verify where it is failing. -Try to update other field instead on the record.

2
  • Okay, so I just came in on Monday morning and started to check the process from every different step and see if it could complete, and I tried it with brand new records and it worked. So I am thinking that maybe it was just the record I was using was bad maybe. I am not sure
    – cmmoutes13
    Apr 17, 2017 at 14:33
  • Still, you should change it not to update inside the loop. Otherwise it might fail in future on limitation exception.
    – Liron C
    Apr 18, 2017 at 7:43
0

Not sure , but it looks like that you didn't add any error handling. this step DECISION: Cap_Cost_Found Executed this outcome: CapCostWasFound Outcome conditions: and 1. {!CapCostsNeedingRemoved} ([a063600000BhyXJAAZ]) Is null false Logic: All conditions must be true (AND)

states that the record found does not fulfill the requirement as it is null / false

it might also be the case that your cap_cost records has insufficient information on it?

Your flow def. finds a cap cost records in regards to step 1 but this one does not match the criteria for step 2 as a result step 3 tries to update NULL records As per error message: Error Occurred: The flow tried to update these records: null.

you might like a decision step that if there is a record ..then but if null then Not

hope that helps the trouble shooting

1
  • That is actually not what that line is saying. That is showing that my flow met the criteria of the Cap Cost ID not being null, meaning that it found a record. This is not where the issue is coming from.
    – cmmoutes13
    Apr 10, 2017 at 13:17
0

It looks for me like you need to include also Needs_Removed_Or_Modified__c field into your CapCostsNeedingRemoved, and drop Id Equals {!CurrentCapCostID.Id} filter from record update.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .