Web-to-Case receives the following error when the contact doesn't exist in Salesforce: Error element myDecision (FlowDecision). The flow failed to access the value for myVariable_current.Account.Type because it hasn't been set or assigned. - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Erik KlinkErik Klink 

Web-to-Case receives the following error when the contact doesn't exist in Salesforce: Error element myDecision (FlowDecision). The flow failed to access the value for myVariable_current.Account.Type because it hasn't been set or assigned.

Best Answer chosen by Erik Klink
Jayson MoralesJayson Morales
Hi Erik,

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

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.

Hope that makes sense.


Regards,
Jayson

All Answers

Jayson MoralesJayson Morales
Hi Erik,

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

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.

Hope that makes sense.


Regards,
Jayson
This was selected as the best answer
Erik KlinkErik Klink
Hi Jayson,
Thanks for the comment. Is there a way for me to figure out which flow or process I should look at?

Regards,
Erik
Erik KlinkErik Klink
Hi Jayson,
I found the process that was the problem. It was trying to update a field on the account associated with the Case. In this example, when the contact didn't exist there was no account there to update.
Thanks again for the insight.

Have a great day!
Erik