Hello friends, today we will discuss How to add lookup field in screen flow in Salesforce. Using lookup fields in Flow screens allows you to create dynamic and interactive experiences for your users. Lookup fields enable users to search for and select records from a specific object, such as accounts or contacts, directly within the flow screen. In this blog post, we’ll explore how to use lookup fields in Flow screens.
Also, check this: Get Size of Collections in Salesforce Flow
Key Highlights :
- Lookup fields in Flow screens are a powerful tool for creating dynamic and interactive experiences for your users.
- By following the steps outlined in this blog post, you can easily incorporate lookup fields into your Salesforce Lightning Flows.
- In addition to searching for records, you can also use lookup fields to create new records within the flow screen.
Process :
Step 1: We take the screen element, and drag and drop the Lookup field. Now on right side we give API name and other info
API Name: AccountLookup
Field API Name: AccountId
Label: Account
Object API Name: Contact
Here we take Object API Name: Contact and contact has a lookup of account. AccountId is the field API name on the Contact.
Step 2: In this screen, We take one more screen element and drag the display text component from the left panel. Now we put Account Id and Account name.
To use a lookup field in a Flow screen, you need to create a new screen with the type “Lookup”. You then need to specify the object that the lookup field will search for records in, and configure any additional settings, such as whether to display the record name only or the record name and the record ID.
You can also add conditions to your lookup field to control which records are displayed based on certain criteria. For example, you can display only accounts that have a specific industry or only contacts associated with a specific account.