-1

I am moving from process builder to Flow and I am trying to create a formula to be used. This formula works already in PB so why won't it work in Flow.

I get the following error:

These issues prevent activation. OwnerID (Formula) - The formula expression is invalid: Syntax error. Missing '='

Here is the formula:

IF(
ISPICKVAL([Case].Account.VCC_Code__c,"CJ_SE"), "00G1C000004moS1UAI",
IF(
ISPICKVAL([Case].Account.VCC_Code__c,"CJ_DE"), "00G1C000004moRrUAI",
IF(
ISPICKVAL([Case].Account.VCC_Code__c,"CJ_ES"), "00G1C000004moRwUAI",
IF(
ISPICKVAL([Case].Account.VCC_Code__c,"CJ_FR"), "00G1C000004moRmUAI",
"00G1C000005AxE9UAK")
)))
2
  • 2
    welcome to SFSE! Please see How to Ask on getting the most from the Community. You should show a screen shot from Flow where you are defining this formula. Also -- hardcoded recordtypeIds should be avoided. Flow has the ability to acquire recordtypeIds by using Get Records element or $Record.Recordtype.DeveoperName
    – cropredy
    Jul 7, 2022 at 17:30
  • Thank you for the recommendations! I will definitely take a look at the How to Ask section.
    – Jettea
    Jul 7, 2022 at 20:19

1 Answer 1

1

The syntax in formulas will be different in Process Builder vs Flow. I can see here that the [Case].Account.VCC_Code__c syntax is not correct for flow. Assuming you're using a Record Triggered flow on the Case, the correct syntax would be {!$Record.Account.VCC_Code__c}.

To find the correct syntax for this type of thing, use the field directly above where you type the formula. It normally says Insert a resource.... You can search in that field for the value that you need and it will give you the correct syntax.

Beyond that, @croperedy's advice above is good. For readability, I would at a bare minimum replace those record ID's with resources of type 'Constant' and name them something like CJ_SE_QUEUE or whatever those record Ids represent. For readability, I also recommend indenting your nested IF statements.

Cheers!

1
  • Thank you so much for the detailed response! I will implement those changes
    – Jettea
    Jul 7, 2022 at 23:08

You must log in to answer this question.

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