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
Faizan Ali 17Faizan Ali 17 

Autofill a lookup field from a picklist value?

Hi all,

I have a picklist that stores names of people. I also have a lookup field to contact.

I want to know if there is a way to auto-populate the lookup field whenever the picklist value has been selected. This will be all be done on the Event object.

Could someone provide an example too? Would be much appreciated!
SwethaSwetha (Salesforce Developers) 
HI Faizan,
Please see this 
https://salesforce.stackexchange.com/questions/123641/auto-populate-lookup-field which shows use of before insert trigger.

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you