TransWikia.com

Flow on Case Is Not Accessing Account

Salesforce Asked by Moonpie on December 18, 2020

Riddle me this, riddle me that…

Prelude

We have a Screen Flow on the Case object. When a user clicks Next it (is supposed to) check whether there is a value in one custom field on the associated Account.

Using new Summer ’20 setup, the entire Case record is passed into the Flow:

enter image description here

Inside the Flow, when I access the caseRecord variable, I can select from the myriad fields (standard and custom) and almost all of the objects (standard and custom) related to the Case:

enter image description here

However, conspicuously missing is Account ID >.

There are some Account-related fields (including AccountId) on the Case that I can access, but that only gets me so far. I need a field on (and later in the Flow, an object related to) the Account.


Question

What could be causing this?


What I’ve Checked & Tried

  • Compared the Field-Level Security of this field:
    enter image description here
    to all the other Lookup(<Object>) fields on the Case object, and there seems to be nothing that is in or not in the AccountId field that is not also not in or in some or all of the other Lookup fields that are accessible in the caseRecord Flow variable.

  • Checked what I’ve thought to check in Permission Sets, but I don’t see anything obvious to me.

  • Manually typing out {!caseRecord.Account.Custom_Field__c} and ...AccountId...:

    Results in an Enter a valid value. error

  • Changed How to Run the Flow to try both System Context options.

  • Verified that the following SOQL query returns a valid result: SELECT Account.Custom_Field__c FROM Case WHERE Id = 'xyzzy'


Workarounds

  1. I can access the Account fields and related objects within the Flow by the following route (where Opportunity_ID__c is a Lookup(Opportunity) we’ve added to the Case object):

    {!caseRecord.Opportunity_ID__r.Account.Custom_Field__c}

    However, not all Cases of the Record Type using this Flow will have Opportunities associated to them, so that will not work long-term.

  2. Do a Get Records step using {!caseRecords.AccountID}. (This is the current "let’s go with it" workaround.)


Postlude

I am hoping I am having a "Doh!" moment and it is something simple (though I will feel foolish after writing all of this….)

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP