How to resolve the error in flow formulas for conditions?

388    Asked by dipesh_9001 in Salesforce , Asked on May 4, 2023

We are migrating workflow rules to flows. Formulas for Conditions is used because of cross-object references (not shown in image below).

Now I also need to include in that formula a reference to the formula(text) field to check if the result is blank. Now the problem is that if the formula in the formula field contains a reference to a lookup, the "error in referenced formula" happens. The interesting thing is that if ISBLANK is replaced by ISNULL, the formula becomes valid, but of course ISNULL is not the correct solution.

The image below is a simplified reproduction of the error: the Formula_1__c contains a lookup Link_1__c.

Is there a workaround for this, aside from copying the whole formula in Formula_1__c inside the Formulas for Conditions (which is what we did for now)? If this is a bug, where can I report this?

Answered by David EDWARDS

It's possible that what you're seeing as flow formulas for conditions is a bug, so I'd submit a case to follow to validate whether or not what you're trying to do is supported.


I would also consider moving the logic of what is in the formula to the condition formula itself. This may or may not be possible depending on what else the formula field is referencing besides the lookup, but entry condition formulas do support traversing up the lookup chain directly. I see in the comments that this is after-save, but for the sake of those reading along, I'd also like to point out that if this was a before-save Flow, I'd really avoid using a formula field since those won't be calculated yet at the time of entry condition evaluation.



Your Answer

Interviews

Parent Categories