Ask Search:
Anthony BernardAnthony Bernard 

Lightning Lookup component in a flow

Im currently trying to do a lookup to the account object within a flow. 

When I go to debug my flow and I type something in the lookup area, no results show up. 

What could I be doing wrong ? 

User-added image

User-added image
Best Answer chosen by Anthony Bernard
Deepak AnandDeepak Anand
Do it like this = 
User-added image

All Answers

sakshi nagpalsakshi nagpal
Hi Anthony,

Can you share your code?
Anthony BernardAnthony Bernard
Hi sakshi, 

Im not dealing with any code, just using the flow builder. Is there a specific place I can go to get code for you to see? 

User-added image
User-added image
Deepak AnandDeepak Anand
Do it like this = 
User-added image
This was selected as the best answer
Anthony BernardAnthony Bernard
Thanks Deepak, that works!. Is there a way for me to display additional fields next to the account name? 

Im trying to get the search results to show as Account name + Member Number + Branch number
Anthony BernardAnthony Bernard
I see its showing the member number already, where can I go to change this configuration to add the branch number? 
User-added image
Anthony BernardAnthony Bernard
Thank you. 

I just have one last question. When I go to the search layouts page, I see a lot of fields selected for different search layouts. But within my flow I only see the Member # field displayed under the account name. 

Am I looking in the right place? 

User-added image
Deepak AnandDeepak Anand
That's because - 
User-added image
Jason FinkJason Fink
Deepak, do you have a link to Flow Builder Lookup Component documentation (existing SF Help doesn't show it)?  I utilized your answer above to return all Accounts.  Can I filter this or a subsequent lookup?  I'd like a user to make a lookup choice for Accounts, then a lookup on Contacts only related to the selected Account.  Is this possible with FB Lookup?  I previously used Record Choices and Picklists but this would be a great replacement.
Deepak AnandDeepak Anand
Jason - No, you cannot do that :-(
sakshi nagpalsakshi nagpal
Hi Jason/Deepak,

 If you want to fetch account records in flow with specific criteria you can always query that in flow.
Sorry if i didnt understand the requirement correctly.

thanks
Jason FinkJason Fink
Thanks Deepak.  Maybe in a future release.
Sakshi - we're refering to the Flow Builder's Screen element's Lookup component that was added with Winter '20, as shown in the OP's post.  Different from Get Records or Record Choices.
Jim PoteetJim Poteet
I'm confused why if I want a list of Accounts I'm searching the contact object. What if I want to lookup contacts?
John McIntoshJohn McIntosh
I'm with Jim Poteet - Iim trying to get it to perform a lookup on contacts and for the life of me cannot get it to filter / show the right data. The Contact lookup for an account seems odd logic
John McIntoshJohn McIntosh
Actually just got it - You need to find an object that has a lookup field to a contact - in our case we have a custom object called Software Contract and we have a couple of lookup to contact fields - one is End_User__c
I tested this thinking it would only return contacts that had been populated in that field but it turns out it looks up all contacts. happy days!
User-added image
Kausar ShaikhKausar Shaikh
Hello Everyone,
I am trying to define a lookup to Asset object on my screen but it's not pulling any results. I tried to set the Field Api Name to "Name" , "Asset" . It's not working. Any idea what am I missing ? 
Lookup Component
Deepak AnandDeepak Anand
You can utilize the self-lookup to Asset itself (ParentId) - 
User-added image
User-added image
Kausar ShaikhKausar Shaikh
Hello Deepak,
It's not recognizing ParentId ..Here's the screenshot. My use case is to auto launch this flow from a case where users are requested to capture additional details when an attribute is true. One of the fields to capture is Machine serial#.User-added image
Deepak AnandDeepak Anand
Can you check the FLS (Field Level Security) of that fields - Parent Asset ?
Kausar ShaikhKausar Shaikh
Deepak, My lookup is working. I was incorrectly populating the lookup component attributes . AssetId worked .
Thanks for all your prompt responses
 
Nathalia CaicedoNathalia Caicedo
@Josh and @Derek thanks for your answers, have been really helpful, however it hasn't really work for me in certain way, I only need a lookup to Accounts that are Business Organizations so I used the Affiliation object and the field hed__Account__c that is an actual lookup to accounts of that specific record type but my result is an error message "Looks like you don't have access to this object, or the object API name is not valid on this Lookup component. Contact your Salesforce admin for help." I'm Admin and I have access to that object and field so I guess that is not the Issue. Hope you can help me to find out what's happening 

Again thanks for your answer 
Best Regards
Nata