Note: This error might look like a familiar error but the resolution mentioned in the salesforce knowledge article is not working in the below case and I am not sure why, hence posting this question.
Problem description:
- I have a process builder on case object set to fire for every time new record is created.
- Criteria is set to 'Formula evaluates to True' with below formula:
AND(NOT(ISBLANK([Case].AccountId)),ISPICKVAL([Case].Account.Active__c,'Yes'))
- With immediate action set to update custom field on the Case object.
- Custom field
Active__c
on the Account object is type picklist with two possible values 'yes' and 'no'.
Screenshots of the process builder:
Creating a case as shown in the below screenshot with very minimal details and especially not populating account details:
Throws below error:
The flow failed to access the value for myVariable_current.Account.Active__c because it hasn't been set or assigned.
Relevant data from log file:
22:14:31.0 (12479016)|WF_FLOW_ACTION_BEGIN|09L370000000FEJ 22:14:31.13 (13607478)|FLOW_CREATE_INTERVIEW_BEGIN|00D37000000H8hr|300370000008ZTl|301370000004weE 22:14:31.13 (15394571)|FLOW_CREATE_INTERVIEW_END|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test 22:14:31.15 (15820974)|FLOW_START_INTERVIEWS_BEGIN|1 22:14:31.15 (16674702)|FLOW_START_INTERVIEW_BEGIN|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test 22:14:31.15 (35470120)|FLOW_ELEMENT_ERROR|The flow failed to access the value for myVariable_current.Account.Active__c because it hasn't been set or assigned.|| 22:14:31.15 (35479812)|FLOW_START_INTERVIEW_END|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test 22:14:31.15 (35517783)|FLOW_START_INTERVIEWS_END|Interview error. Aborting all.|5525dfa7819c33f438ce3cef9b6c15c668d8ff2-3d11|Test 22:14:31.15 (35528335)|FLOW_START_INTERVIEWS_END|1 22:14:31.0 (35588898)|WF_FLOW_ACTION_ERROR|09L370000000FEJ|300370000008ZTl|Error executing flow: test, FlowDefId: 300370000008ZTl, FlowVersionId: 301370000004weE 22:14:31.0 (35612585)|WF_FLOW_ACTION_ERROR_DETAIL|An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. 22:14:31.0 (35683203)|WF_FLOW_ACTION_END|09L370000000FEJ
URL to the complete debug log : https://pastebin.com/J5b7nX7g (Note: You can see from the log that there are no other workflow rules or triggers on the case object).
My analysis: When the first condition inside the AND expression is evaluating as false, why is it trying to evaluating the second condition to check the custom field on the Account object? It shouldn't right?
Any help?
EDIT: I am looking to solve this using option 'Formula Evaluates to True' only because I have other complex criteria like checking the day(Mon vs Tue and etc) of the case creation.