[SalesForce] How to debug flow errors

We have some flows in application which do operations like record update etc, we have WF rules, triggers, process builders as well which also update records.

Sometimes i see error like this in logs which does not clearly points to what is broken. This error does not occur when logged in as admin, but occurs for specific users. Since users of different profiles with different level of object / field access use the app, it is difficult to trace the issue :

FLOW_ELEMENT_ERROR An error occurred. Try again, or contact Salesforce Customer Support and provide this error ID: 1208800385-8725 (-445309063)

FLOW_ELEMENT_ERROR 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 301240000009uXA. 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 https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#'>API Exceptions

Does contacting Salesforce Customer Support and providing error number help getting exact cause of error ?

Best Answer

When you see any flow error you can follow below steps:

  1. Identify flow name: You can identify flow name by id using workbench from metadata type and component.

enter image description here

  1. When there is flow error salesforce send an email to the last modified person with detailed information where flow failed. It contains every single step of flow and at what steps it failed.

enter image description here

As a flow best practice, Salesforce recommend configuring the fault connectors in your flow so that you always receive an email when a flow fails. In the email, include the current values of all your flow’s resources. The resource values can give you insight into why the flow failed.

enter image description here

Related Topic