You need to sign in to do that
Don't have an account?

Help with Process builder that calls a flow?
Hi everyone; I have spent a few hours banging my head into the wall, hoping someone out there has some insight...
My basic architecture: I made a new custom object called "Account Entity" I made a lookup field on the Account object to link to the Account-Entity__c object. my process builder attempts to do the following: When a new account is created: if that new account does not have a parent account, OR if the new account has a parent account that does not have a related Entity, AND the account has record type name = Library, AND the account has location (custom formula field) = US, THEN, auto launch a flow that creates a new entity record, and updates the account to link to this new entity record.
When I create a new account with record type name = library AND location = US, it works perfect. (regardless of having parent account)
If I create a new account with record type name <> library, but has a parent account, it works as expected (no entity created)
If I create an account that does not have record type = library and has no parent, OR
If I create an account that has record type name = library, but location <> US,
I get this message:
Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301560000008XgL. Contact your administrator for help.
Click here to return to the previous page.
In my email (as the admin), I get more details:
“An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Parent.Account_Entity__c because it hasn't been set or assigned.”
Where I am confused… in these scenarios, my critera should evaluate to false and the flow should not even be called? Is this something as simple as my conditional logic is wrong? thanks all
-Aaron

My basic architecture: I made a new custom object called "Account Entity" I made a lookup field on the Account object to link to the Account-Entity__c object. my process builder attempts to do the following: When a new account is created: if that new account does not have a parent account, OR if the new account has a parent account that does not have a related Entity, AND the account has record type name = Library, AND the account has location (custom formula field) = US, THEN, auto launch a flow that creates a new entity record, and updates the account to link to this new entity record.
When I create a new account with record type name = library AND location = US, it works perfect. (regardless of having parent account)
If I create a new account with record type name <> library, but has a parent account, it works as expected (no entity created)
If I create an account that does not have record type = library and has no parent, OR
If I create an account that has record type name = library, but location <> US,
I get this message:
Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301560000008XgL. Contact your administrator for help.
Click here to return to the previous page.
In my email (as the admin), I get more details:
“An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Parent.Account_Entity__c because it hasn't been set or assigned.”
Where I am confused… in these scenarios, my critera should evaluate to false and the flow should not even be called? Is this something as simple as my conditional logic is wrong? thanks all
-Aaron
Did you check this link -
https://help.salesforce.com/apex/HTViewSolution?id=000212174&language=en_US
In your criteria, you are checking 'Account parent Is Null True'. Does it need to be the reverse way -
Account parent Is Null False. Just give it a try and please let us know.
Regards,
Shashi
What I currently have is (1 or 2)
1. Account.Parentid isnull = True
2. Account.Parent.AccountEntity isnull = True
Based on what that article says, I need to change it to be:
1 or (2 and 3)
1. Account.Parentid isnull = True
2. Account.Parentid isnull = False
3. Account.Parent.AccountEntity isnull = True
I am going to test this out now, but I am optomistic!