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
Big EarsBig Ears 

Web-to-lead - Populating custom reference/lookup fields - possible?

Just a quick question:

 

I'm playing with Web-to-lead functionality and was hoping to fill in a custom field on our leads using the hidden input tag. One of our custom Lead fields is a lookup/reference field that links to an account and I'd like to fill that in automatically, so that inbound leads are linked to the right generating account.

 

I've tried using the id of an account and also the name of an account to test it, but neither seems to populate. Does anybody know if it's simply not possible? Or should I be using the 18, rather than 15 digit id, etc?

 

With thanks,

Andy

Best Answer chosen by Admin (Salesforce Developers) 
Big EarsBig Ears

Hello there,

 

It looks like it's simply not possible. I'll have to populate another field instead of the lookup.

 

http://success.salesforce.com/ideaView?id=08730000000Br6C

All Answers

Janet GuoJanet Guo

I always advocate using the 18 digit ID. If that doesn't fix it, you might want to take another look at your Apex controller. What you're asking about, from my understanding, is definitely possible. 

AndyRouseAndyRouse

Janet,

 

Thank you for your response. I'm not using an APEX controller, as I'm just using the built-in Web-to-Lead functionality provided by Salesforce. I'm trying to keep it nice and simple at this point.

 

However, I'll have a crack at using the 18 digit id and see if that makes a difference.

 

Thanks again.

Big EarsBig Ears

Hello there,

 

It looks like it's simply not possible. I'll have to populate another field instead of the lookup.

 

http://success.salesforce.com/ideaView?id=08730000000Br6C

This was selected as the best answer