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
BobBob 

New Errors The flow failed to access the value for myVariable_old.AccountId because it hasn't been set or assigned

I am having an issue with a flow process. It keeps giving me  the following error. The flow failed to access the value for myVariable_old.AccountId because it hasn't been set or assigned. I updated the updated record decison but it still give me the same error. Below is the error report and the process images.  Any help with this would be greatly appreciated.

An error occurred at element myDecision2 (FlowDecision).
The flow failed to access the value for myVariable_current.AccountId because it hasn't been set or assigned.

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: Set_Primary_Quote_Process
Type: Workflow
Version: 6
Status: Active
Flow Interview Details
Interview Label: Set_Primary_Quote_Process-7_Quote
Current User: NA Integration User (00580000003Mg0C)
Start time: 10/19/2016 10:19 AM
Duration: 0 seconds
How the Interview Started
NA Integration User (00580000003Mg0C) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 0Q0340000007wpwCAA
myVariable_current = 0Q0340000007wpwCAA
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "10/19/2016 10:19 AM"
DECISION: isChangedDecision4_myRule_3_Name
DECISION: isChangedDecision5_myRule_3_Oracle_Quote_c
DECISION: isChangedDecision6_myRule_3_Amount_c
Executed this outcome: isChangedRule_6_myRule_3_Amount_c
Outcome conditions: and
1. {!myVariable_old} (0Q0340000007wpwCAA) Is null false
2. {!myVariable_old.Amount__c} (295,824) Does not equal {!myVariable_current.Amount__c} (90,608)
Logic: All conditions must be true (AND)
DECISION: isChangedDecision7_myRule_3_Net_Revenue_c
Executed this outcome: isChangedRule_7_myRule_3_Net_Revenue_c
Outcome conditions: and
1. {!myVariable_old} (0Q0340000007wpwCAA) Is null false
2. {!myVariable_old.Net_Revenue__c} (295,824) Does not equal {!myVariable_current.Net_Revenue__c} (90,608)
Logic: All conditions must be true (AND)
DECISION: isChangedDecision8_myRule_3_Order_Type_c
DECISION: isChangedDecision9_myRule_3_Pricebook_c
DECISION: isChangedDecision10_myRule_3_Stage_c
Executed this outcome: isChangedRule_10_myRule_3_Stage_c
Outcome conditions: and
1. {!myVariable_old} (0Q0340000007wpwCAA) Is null false
2. {!myVariable_old.Stage__c} (Draft) Does not equal {!myVariable_current.Stage__c} (Cancelled)
Logic: All conditions must be true (AND)
DECISION: myDecision

User-added image

User-added image

User-added image

 
NagendraNagendra (Salesforce Developers) 
Hi Bob,

Description:A Process that makes a cross-object reference will fail when the foreign key (i.e. relationship field) the reference depends on is not populated.

For example, if a Process on Contact has the criteria "[Contact].Account.Name equals Acme", this Process will fail when triggered on a Contact where Account is blank. The generated error in Debug Logs would be like "The flow failed to access the value for myVariable_current.Account.Name because it hasn't been set or assigned. "

Resolution:To avoid this type of error, use criteria to check if the foreign key (aka relationship) field is null before making cross-object references based on that field.

Continuing the example given above, the process criteria should be "[Contact].AccountId Is Null False" AND "[Contact].Account.Name equals Acme" (in that order - the check for AccountId being null has to be before the cross-object reference that relies on the Account field being populated).

When using "Formula evaluates to true" in the Criteria for Executing Actions*, the formula below can be used in this example:

AND (NOT(ISBLANK( [Contact].AccountId )), [Contact].Account.Name = "Acme")
 
For more information with similar error and suggested workarounds check with below links: Kindly mark this post as solved if the information help's so that it gets removed from the unanswered queue and becomes a proper solution which results in helping others who are really in need of it.

Best Regards,
Nagendra.P
BobBob
So where in my flow would I add that criteria ? I'm not sur ewhere to add that information.