Process fails with "The flow failed to access the value for [example] because it hasn't been set or assigned. "
|Knowledge Article Number||000212174|
|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")