Loading

Flow trigger error: 'The record couldn’t be saved because it failed to trigger a flow.'

Дата публикации: Oct 13, 2022
Описание
You might encounter the error, "The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301***. Contact your administrator for help" when working with flows. This can show up when saving a record, running an apex test class manually or via deployment and performing and insert/update through the API.
Решение
Here are the various options that will help you understand the cause for the error,
  • Error Email:  Creator of the flow would have received an error email with detailed step by step information and error message. Great way to see if the issue could be data or implementation related.
  • Capture debug logs, (make sure to set debug level as FINEST for workflow) Sometimes the debug log will tell you exactly which element of the Flow is failing and why is it failing.
  • Use debug screen where you can display Request and Response details,
    press Ctrl + Shift + M (on a windows PC) or command + shift + M (on Mac) inside the flow designer.
  • Use Workbench REST Explorer to capture more details about process/flow metadata.
1. Get the version Id from the error message
2. Login to Workbench
3. Go to Utilities > REST Explorer >> Perform a GET 
4. Add the following to the URI field and change the Id with the FlowId you are investigating /services/data/vXX.x/tooling/sobjects/flow/30124000000PcNDAA0  [NOTE: vXX.x refers to the API version and as new tooling API features are released, use the latest version
5. Click Execute
6. Open the 'attributes' folder
7. Check the 'ProcessType', if the value is 'Flow' then this is a normal flow, if the value is 'Workflow', this is a Process. Here you can also see the MasterLabel, which should provide you with the name of the flow/process.
8. Explore the Flow Metadata tree to see what a specific element is doing, this is more useful when it's a Process Builder Flow since the error email and other error messages sometime refer to the auto-generated name like myRule1_1. 
NOTE: Executing a DELETE in REST explorer will in fact delete the flow if inactive. Please be careful when using DELETE option in REST Explorer.


Most common error messages or issues encountered with flows 

Номер статьи базы знаний

000382895

 
Загрузка
Salesforce Help | Article