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
Kyle OberholtzerKyle Oberholtzer 

Error: Cannot Execute Flow Trigger

Hey all!

I have a flow that functions completely as expected in Debug mode. However, when it runs in production, it fails at the first update. 

The error is as follows: 
Error Occurred: The flow tried to update these records: null. This error occurred: CANNOT_EXECUTE_FLOW_TRIGGER: We can't save this record because the “Run COGS Flow” process failed. Give your Salesforce admin these details. An error occurred when executing a flow interview. Error ID: 1028008348-267851 (387845667). You can look up ExceptionCode values in the SOAP API Developer Guide.

What doesn't make sense to me is that while the error looks like it is trying to update a null record, here's the log of the update action: 

FAST UPDATE: Commit_NS_COGS
Update OrderItem records whose IDs are stored in {!NS_Loop}.
Variable Values
[Id=8022M00000CUp3SQAT,Unit_COGS__c=11.48,Product2Id=01t2M000005oOVYQA2]
Result
Failed to update records whose IDs are in {!NS_Loop}.


So the ID is there, the only thing that is a new piece of information is Unit_COGS__c . 
I've checked - both Unit_COGS__c and the source of the changed info are the same data type, with the same amount of digits and decimal places.  
 

Kyle OberholtzerKyle Oberholtzer

(Also, I know that the field is editable - this isn't a permissions issue.)
Shows that the field is editable by all users.

 

AbhishekAbhishek (Salesforce Developers) 
Hi Kyle,

There could be many reasons for this kind of errors.

But I would suggest you raise a case with salesforce team and provide them this error

"Error ID: 1028008348-267851 (387845667). You can look up ExceptionCode values in the SOAP API Developer Guide."

As per the Error ID, our team will check the backend logs and assist you.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Regards,
​​​​​​​Salesforce Support.
Kyle OberholtzerKyle Oberholtzer
Sounds good! I'll do that. 

Quick question, then, for my knowledge. Will the Salesforce Team be able to find information that I cannot using Debug Logs?
AbhishekAbhishek (Salesforce Developers) 
YES, We have some Internal tools to check it.
Kyle OberholtzerKyle Oberholtzer

Reopening this question - 

Salesforce Support is not able to help on this question, as Flows are not supported under the standard Salesforce subscription. The issue remains unsolved, would appreciate your help!

Kyle OberholtzerKyle Oberholtzer

Also, I get this error first before getting the one detailed above: 

The flow tried to update these records: null. This error occurred: MAX_DEPTH_IN_FLOW_EXECUTION: Maximum flow depth exceeded: flow Run_COGS_Handler is triggered for [8012M000008Po5c] 

vikrant Chauhan 5vikrant Chauhan 5
Hi Kyle,
you have to check your flow or process builder with the name "Run COGS Flow", there might be any condition in updating record that is failing you need to edit that. After that it will work. If you find this solution helpful then mark it as best answer.
Regards,
Vikrant