Quirks with case and lookups in field references in visual workflow

I’ve been running into a number of bizarre issues with field references in flows.

To illustrate these, I created a simple flow with a fast lookup to contact to an sobject variable named “sovContact” and a screen to display account fields.

test_flow.png

  1. Cross object field references are case sensitive.

    Works: {!sovContact.Account.Name}

    Does not work (flow will not save) {!sovcontact.account.name}

  2. Regular field references will auto-correct case

    Entering {!sovcontact.firstname} into the display text element will save fine.

    However, when you reopen the screen, it will have magically had case fixed to {!sovContact.FirstName}

  3. Field references to custom lookup fields on the sobject variable are auto-updated incorrectly.

    We have a field on contact that is a lookup to the corresponding salesforce user account, with API name of Salesforce_User_Account__c.

    If you click on “Select resource” and include that field, it will be entered as {!sovContact.Salesforce_User_Account__c}

before_save.png

The flow will save and run properly. Reopen the flow, and take a look at the screen.

after_Save.png

The field has been renamed to {!sovcontact.salesforce_user_account__r}

note that it is all lowercase, and ends in __r now

This is invalid, and the flow will not let you save. You need to change it to {!sovContact.Salesforce_User_Account__r.Id} (making sure that case is correct) in order to save (and stay sane)

Note this is not an issue w/ standard lookup fields as they dont end in __c.

As far as I can tell, none of this is documented in the help documentation on cross object field references in flows and certainly seems buggy to me.

I have an open case looking into this with support - will see how it ends up getting classified.

 
9
Kudos
 
9
Kudos

Now read this

Infinite Flow Refined

UPDATE - 7.7.15: This will eventually trigger an error and is now a known issue, with expected behavior listed as “TBD”. So as I expected, its not known whether this will be a supported use case or not. Using a fast lookup / update this... Continue →