Skip to main content

#Lookup Filter0 discussing

Screen Flow Lookup Component Filters, Limitations and Workaround

 

To anyone who is looking into this, I hope this may help you. 

 

The Lookup screen components, as well as record variable lookup fields has limitations in screen flows. Documentation is here

Lookup Screen Input Component and the considerations states:

  • Dependent lookup filters aren’t enforced for the Lookup component in a flow. Other lookup filters are enforced the same as they are in Lightning Experience record pages. When the flow accesses the Salesforce database, lookup filters are enforced. For example, when the flow executes the Create Records element, the flow fails if the value of the lookup field doesn’t meet the lookup filter requirements.
  • Dependent lookup filters aren’t supported.

 

Consider a business scenario:

  1. User has a picklist field, referencing a global picklist.
  2. Object record also has a picklist field, referencing the same global picklist.
  3. Lookup field on object record has lookup filter, only if the picklist values are equal.

This works fine on flexipages, but not in screen flow lookup components. 

 

Workaround:

However, if the lookup filter is changed from EQUALS to CONTAINS, then the filter still works. Just note, this is then not supported. 

 

#Screen Flow  #Lookup Filter

0/9000

So I have this custom object called Candidate__c, and there is this lookup field called Service_Coordinator__c that looks up to Contact. This lookup field has a lookup filter that is dependent on another field in Candidate, a picklist field called Regional Center. The lookup field should show only the Contacts when they are affiliated with an Account with the same name as the Candidate Regional Center. The lookup field works the way I want when I edit it directly on the record page, but how should I make the lookup field work that way when it is referenced in a Screen Flow or an Experience Builder page?

 

#Lookup Filter

1 answer
0/9000

Hi All,

 When we create task on any object inside salesforce, the assign to id  lookup field shows salesforce licence users along with community users. How can we apply filters on task object assign to field so that it doesn't show community users. I want only the salesfoce users to come up in the look up field.

 

I also tried to explore filters on lookup field. But lookup filters is not available on assign to field on task.

 

Any suggestion on how to achieve this?

 

Thanks,

Adarsh  

1 comment
  1. Jul 27, 2020, 3:18 PM

    I don't believe that you can. One option may be to remove access to the community users for those users who you don't want community users to show up for. But as far as filters go you can't do it on that standard field.

    Another option maybe to create your own custom field where you apply the filters, and you copy the value from the custom field to the standard field in automation.

    A third option may be to use validation rules to prevent users from selecting a community user in the assigned to field, and only allow them to select an internal user.

0/9000

Error messages can originate from a variety of sources in our org (Validation Rules, Lookup Filter, and even code).

Finding their origin can sometimes be difficult and time-consuming. Similarly, email templates can also be hard to locate.

 

Luckily, there is a simple way of locating them 🙂

A faster way to identify the Source of Validation Rules, Lookup Filters, and Email Templates

0/9000

@Alex Edelstein 

  1. We have a process that executes after a Case is updated.  It's purpose is to update the Case's Contact record.
  2. The Contact object's Account field has a Lookup Filter.  The filter was added AFTER some records were created with values that would now fail with the current filter.
  3. The Case record is updated, executing the Process.
  4. The Process attempts to update a custom field on the Case's parent Contact.
  5. The Process fails with the error:   FIELD_FILTER_VALIDATION_EXCEPTION .
  6. If the Contact record is corrected or if the Lookup Filter is altered then the Process works as expected.
  7. Is there a method to bulletproof the process to avoid the user seeing the Fault Error Message?
  8. With Flow we have fault handling.  I am hoping I could update the Contact via the Flow, and if it should fail due to the same error, the fault handling would handle it better such as executing a Core Action.
  9. My question is if the Process calls the Flow, and then Flow's Fault Handler executes, would the Process still generate the same error to the end-user?
  10. Or do you have any other suggestions?

@Salesforce Process Builder @Jennifer (Jen) Lee @RAKESH GUPTA @Meighan Brodkey @Jake Faris @Shannon Hale

0/9000

@Elna Miller @Jacinta Burke Is Salesforce aware of this "Idea", just curious as this seems like the sort of thing that shouldn't be an Idea when (to me) it is clearly a bug.  In short, you set a lookup filter as optional, in Classic the user is able to select not to observe the filter and search outside of the parameter.  In Lightning, the user is not given a choice to override the filter and is not even aware that a filter is in operation.

Lightning Lookup Filter Fix

5 comments
  1. Mar 8, 2019, 9:01 AM
    @Kelly Vida

    Thanks for the update. I guess the confusion stems from the fact that we still have to use Classic in Lightning to configure the lookup filter and there is nothing on that page to indicate that setting it to Optional has no effect in Lightning.

    Is that something that can be changed or is there a plan/rough timescale for these sorts of pages to be built in Lightning?

0/9000