“Field StageName does not exist” when creating a formula for Case Object

caseformulaprocess-builder

I'm trying to create a process that validates the Stage of the Case based on certain record types and I'm getting this crazy error:

enter image description here

     ISPICKVAL(StageName, "Escalated") &&
(
[Case].RecordType.DeveloperName ="Account_Closure_Form" || [Case].RecordType.DeveloperName 
="Create_A_Batch" || [Case].RecordType.DeveloperName ="Debit_or_EBT_Research_Form" || 
[Case].RecordType.DeveloperName ="Research_Fee_Reversal_Special_Request_Form" || 
[Case].RecordType.DeveloperName ="Manager_Review_Case" || [Case].RecordType.DeveloperName 
 ="Full_Card_Number_Request")

I'm trying to send an email notification if the Case stage is "escalated" and the Case Record Type falls into ANY of the following record types.

I did checked that the CaseStage was added in the Record Type Layouts.

Any idea on why this error is showing and how it could be solved ??

Best Answer

Notice how all the other field paths begin with [Case].. You need to do the same with StageName, changing it to [Case].StageName. However, the Case object in fact does not have this field. If you had for example a custom Opportunity__c lookup you'd do [Case].Opportunity__r.StageName. Alternatively, if you wanted to filter on something like Status you would use [Case].Status.

Related Topic