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.

 
14
Kudos
 
14
Kudos

Now read this

Auditing Permission Sets

While permission sets makes assigning permissions a breeze, it can be a bit of a bear to audit all 150 of them. By audit, i mean see which ones give you [some permission] on [some object] So this blog post will cover a number of ways to... Continue →