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
Andreas GerogiannisAndreas Gerogiannis 

Prepopulate Lead OwnerId from website with Drop down - Doesn't work...

Hi to all,

I am trying to pre-populate Ownerid on a new Lead based on a dropdown menu. But it doesnt work. Any ideas?

User-added image
Best Answer chosen by Andreas Gerogiannis
Ketankumar PatelKetankumar Patel
Hi Andreas, 

Are you using web2lead form in your website?

if yes then I don't see Lead owner field as available field to use in web2lead form I would recomment
  1. Create picklist field on lead and use that field in webtolead form and based on that field input use assignment rule to change the owner.
  2. Create picklist field on lead and create trigger (before Insert) on lead and based on this field input find that user from your org using soql and get its userId assign it to owner lookup field.

All Answers

Ketankumar PatelKetankumar Patel
Hi Andreas, 

Are you using web2lead form in your website?

if yes then I don't see Lead owner field as available field to use in web2lead form I would recomment
  1. Create picklist field on lead and use that field in webtolead form and based on that field input use assignment rule to change the owner.
  2. Create picklist field on lead and create trigger (before Insert) on lead and based on this field input find that user from your org using soql and get its userId assign it to owner lookup field.
This was selected as the best answer
Andreas GerogiannisAndreas Gerogiannis
Thanks! You just confirmed what I was thinking from the beginning. I ll create a custom field and create assignment rules based on that.