During Email to Case process, I built a process builder which runs on the email message objects and checks for multiple conditions before executing actions
Here's a scenario:
(If it is incoming email and case status is closed)
[EmailMessage].Incoming = true && ISPICKVAL([EmailMessage].Parent.Status,"Closed") Then Reopen the Case
Problem is that now when using standard Salesforce "Send EMail" action is used from contact or opportunity (email quote/pdf) - I get the following error:
Error element myDecision (FlowDecision). The flow failed to access the value for myVariable_current.Parent.Status because it hasn't been set or assigned.
I believe this is because, even when sending email, it checks the process builder condition and does not find a case associated to the email message being sent and hence fails
Correct me If I am wrong
Now, I have to fix it and they way I have done it is that,
I have taken a new condition at the top of process builder which checks if incoming email is False then update email message status as existing status which is essentially a dummy update.
Is there any other way I can achieve this without code.?