0

Given Case object with a three level dependent picklist structure:

  • Case.Reason__c (picklist)
  • Case.Reason_Detail__c (dependent picklist controlled by Case.Reason__c)
  • Case.Reason_Subdetail__c (dependent picklist controlled by Case.Reason_Detail__c)

Given a record-triggered flow

  • That executes upon deletion of the Case and uses the Send Email action

Given a text template used in the Send Email action that references each of the three aforementioned Case fields

Case Reason: {!$Record.Reason__c}
Case Reason Detail: {!$Record.Reason_Detail__c}
Case Reason Subdetail: {!$Record.Reason_SubDetail__c}

When a Case is deleted

  • where all three levels of the picklist hierarchy are NULL

Then, the Flow aborts with ...

Error element Alert_stakeholders (FlowActionCall).
The flow failed to access the value for $Record.Reason_SubDetail__c because it hasn't been set or assigned. 

I don't get this. The $Record flow variable has access to all of the fields in the deleted case. And, if the Case.Reason_Subdetail__c has a value, the flow works fine and renders the email as expected.

1 Answer 1

1

So, I can't explain why this fails but I can provide a workaround:

  • Introduce a formula element CaseReasonSubdetail that wraps the Case.Reason_Subdetail__c as follows:

    BLANKVALUE(TEXT({!$Record.Reason_Subdetail__c}),NULL)
    
  • And change the text template to reference the formula

    Case Reason: {!$Record.Reason__c}
    Case Reason Detail: {!$Record.Reason_Detail__c}
    Case Reason Subdetail: {!CaseReasonSubDetail}  <<-- the formula field
    

Note that this error occurs only for the third level of the dependent picklist - which I realize makes no sense. The formula field workaround was not required for level one or two - even when the values for those fields were NULL.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .