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
Clemens KemperClemens Kemper 

record failed to trigger a flow - cannot close "won" opportunities

Hey guys. I'm irregularly experiencing troubles, that I suddenly cannot close won opportunities. Trying to set an opportunity 'closed won' results in the following 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 30124000000LrED . Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.

I tried to use Mayank Srivastava's solution from this post: https://success.salesforce.com/answers?id=9063A0000019NR7QAM
However my Flow designer is completely blank - I cannot see any unsaved flows. (see screenshot)
Any suggestions what I can do?
Much appreciated!

User-added image

Here is the Error-Email Salesforce send to me 

Error element myRule_1_A1 (FlowRecordCreate).
This error occurred when the flow tried to create records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: OrderCreated: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user [00524000001RgP1] as owner of task: [] Trigger.OrderCreated: line 59, column 1. 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: Opportunity_Won
Type: Workflow
Version: 22
Status: Active

Flow Interview Details
Interview Label: Opportunity_Won-22_Opportunity
Current User: Clemens Kemper (00524000001SVfn)
Start time: 23.10.2017 13:29
Duration: 0 seconds

How the Interview Started
Clemens Kemper (00524000001SVfn) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0062400000Zi7uUAAR
myVariable_current = 0062400000Zi7uUAAR

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "23.10.2017 13:29"

DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!myVariable_current.IsWon} (true) Equals true
Logic: All conditions must be true (AND)

DECISION: myRule_1_pmetdec

RECORD CREATE: myRule_1_A1
Create one Order record where:
AccountId = {!myVariable_current.AccountId} (0012400000NH9v4AAD)
Ansprechpartner__c = {!myVariable_current.Ansprechpartner__c} (null)
Auf_Wasser__c = {!myVariable_current.Auf_Wasser__c} (false)
BillingCity = {!myVariable_current.Account.BillingCity} (Düsseldorf)
BillingCountry = {!myVariable_current.Account.BillingCountry} (DE)
BillingPostalCode = {!myVariable_current.Account.BillingPostalCode} (40235)
BillingStreet = {!myVariable_current.Account.BillingStreet} (Schlüterstraße 10)
EffectiveDate = {!myVariable_current.CloseDate} (23. October 2017)
Opportunity__c = {!myVariable_current.Id} (0062400000Zi7uUAAR)
Pricebook2Id = {!myVariable_current.Pricebook2.Id} (01s24000004FUmIAAW)
Rechnungsdatum__c = {!myVariable_current.CloseDate} (23. October 2017)
Status = Draft
Veranstaltungsart__c = {!myVariable_current.Veranstaltungsart__c} (Silvesterfeuerwerk)
Z_nddatum__c = {!myVariable_current.Z_nddatum__c} (31. December 2017)
Z_ndzeit__c = {!myVariable_current.Z_ndzeit__c} (0:00)
berraschung_f_r__c = {!myVariable_current.berraschung_f_r__c} (null)
ueberraschung__c = {!myVariable_current.berraschung__c} (false)
Result
Failed to create record.
Best Answer chosen by Clemens Kemper
Gokula KrishnanGokula Krishnan

Hi Klemens,

Check whether this user (00524000001RgP1) is Active. If its inactive, Active the User.

if  you don't wish to Active this User (00524000001RgP1).

Then correct your flow, there may be some User ID binded, you need to change it.

Thanks,

If it helps you, please mark is as best answer, so it will be helpful for other developers.

All Answers

Gokula KrishnanGokula Krishnan

Hi Klemens,

Check whether this user (00524000001RgP1) is Active. If its inactive, Active the User.

if  you don't wish to Active this User (00524000001RgP1).

Then correct your flow, there may be some User ID binded, you need to change it.

Thanks,

If it helps you, please mark is as best answer, so it will be helpful for other developers.

This was selected as the best answer
Clemens KemperClemens Kemper
Dear Gokula,
thanks for your quick answer this worked yesterday - sort of!  Today I having the same trouble again today. The Error Email Salesforce send reads this time:

Error element myRule_1_A1 (FlowRecordCreate).
This error occurred when the flow tried to create one or more records: Error occurred attempting to get data type for : RawFieldImpl[tableName: Order, columnName: Pricebook2Id__NotFound]. For details, see API Exceptions.


There seems to be some sort of issue with the price book, but I couldn't figure out what I have to change. Any Ideas?
Gokula KrishnanGokula Krishnan
Hi Clemens,

I guess, in the flow there may be some Pricebook2Id had been hardcoded, Check whether that pricebook ID is deleted (or) is inactive (or) for the user the pricebook access is there.

Thanks..
Clemens KemperClemens Kemper
Dear Gokula,
Thanks for your answer. There is nothing hardcoded. we build the flow using the flow builder in SF. 

The most confusing issue is that this error occurs randomly, stays for 2-3 days and suddenly disappears and everything works just fine. It seems something is asynchronous but I have no Idea where to look. 

Any suggestions?