function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karen MadiganKaren Madigan 

Visual Flow Cross-Object Reference to Formula Fields Returning Inaccurate Values

I'm encountering an issue with a cross-object reference to a checkbox field that is driving me crazy. If anyone has a suggestion I'm all ears.

In my Flow I've done a Fast Lookup to an Account (HhAcctVar). This account has a parent account where I want to access a checkbox formula field (IsInactive__c).

The problem is that the cross-object reference to the field always returns the default value of the formula (ie. the false return value of an IF statement).

The problem isn't isolated to just checkbox formula fields. I've tested cross-object references to other types of formula fields (text, number, date) all with the same result, the default value is always returned.

User-added image
In this example you can see how I'm trying to access the fields (HhAcctVar.Parent.IsInactive__c for example). To help debug I've also looked up to the parent record and am showing the fields from that record (ClientAcctRec.IsInactive__c).

I presented this question to the Success Community, but so far the suggestion is to create additional "workaround" fields. This could be a big problem as I have many flows which access many object using cross-referencing.
https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001omi&fId=0D53000002HqaVW&s1oid=00D300000000iTz&s1nid=0DB30000000072L&emkind=chatterCommentNotification&emtm=1445029379632&s1uid=0053000000A7Dl2&fromEmail=1&s1ext=0 (https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001omi&fId=0D53000002HqaVW&s1oid=00D300000000iTz&s1nid=0DB30000000072L&emkind=chatterCommentNotification&emtm=1445029379632&s1uid=0053000000A7Dl2&fromEmail=1&s1ext=0)

Any ideas? Help, please!!!  :)
logontokartiklogontokartik
I am not sure if I understand your issues. I tested all cross object formulae with flows and everything seems to be working ok.

Here is what I did.

I created Custom Field on Account - Parent Account Name - Cross Object Field -- > ParentAccount.Name
I created Custom Field on Account - Test Formula --> Formula Field that concatenates BillingCity with text 'Formula' --> BillingCity + ' Formula ';
I created Custom Field on Account - Test Cross Object Formula --> Formula Field that gets the value of Test Formula from Parent Account --> ParentAccount.Test_Formula__c

I got all these via Fast lookup and everything is getting populated as expected. I am not sure what the issue might be. Have you tried replicating it in a different Salesforce org? maybe like a developer org?


 
Karen MadiganKaren Madigan
Hi logontokartik,

The problem occurs when the formula field has an IF or a CASE statement. It appears that the IF always defaults to its "false" answer and the CASE statement does something unpredictable.
Karen MadiganKaren Madigan
Another update to my findings: Creating a formula field that copies the value of the formula field with the IF or CASE statement also throws an incorrect value when accesses via a cross-object reference. For instace, if I have a formula field with an IF statement called "FieldWithIF" and I make another one that copies that field "CopyOfFieldWithIF", when I reference CopyOfFieldWithIF, I still get the same value as when I reference FieldWithIF:

AcctVar.Parent.FieldWithIF__c     =     AcctVar.Parent.CopyOfFieldWithIF__c

Cross references to formula fields that do not have an IF or a CASE statement return accurate values.