function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abhi RayAbhi Ray 

Creating a Flow for auto-populating a field from a Lookup Object

Hi All,

I am new to Flow Designer. Can you anyone tell if the following scenerio is possible using Flows?

- I have a custom object country mapping, it has 2 fields ISOCountryCode(picklist) and Currency(Picklist).
- On the Lead Object, there is also standard field such as CountryCode(Picklist) and CurrencyCode(Picklist)

- What I want to achieve anytime a lead is created. As soon as user select the country from the picklist, Country Code from Lead should match aganist the country code on custom object. Once matched, the Lead currency should pick the value from the CustomObject Currency Picklist field and auto-populate on lead. 

Match (Lead.CountryCode) with (CustomObject.Country)
Picklist(Lead.Currency) = Picklist(CustomObject.Currency)

Can it be done without a trigger using Flows?


ShashankShashank (Salesforce Developers) 
This can be done using the fast lookup and fast update elements. There is a pilot feature called headless flows which needs to be enabld for this, so that the flow can be triggered by a workflow rule in the background.

1.) Use fast lookup to query the custom object with the lead country code and get the currency in the sobject variable.
2.) Use the variable value and update the lead using a fast update element.