You need to sign in to do that
Don't have an account?
Laura Gil
How to set a lead record type when creating a lead via web-to-lead?
Hi all,
I would like to create a web-to-lead which will set the record type accordin to certain criteria.
I found this blog which is doing what I would like to achieve:
https://www.simplysfdc.com/2013/06/salesforce-setting-record-type-in-web.html
The problem is that this needs the Id of the record type:
<input type=hidden name="recordType" id="recordType" value="01250000000HkoV">
that means it needs hardcoding.
Does anyone know if there is a way not to use hardcoding for the used input type tag or just if there is a way not to hard code this?
I would like to create a web-to-lead which will set the record type accordin to certain criteria.
I found this blog which is doing what I would like to achieve:
https://www.simplysfdc.com/2013/06/salesforce-setting-record-type-in-web.html
The problem is that this needs the Id of the record type:
<input type=hidden name="recordType" id="recordType" value="01250000000HkoV">
that means it needs hardcoding.
Does anyone know if there is a way not to use hardcoding for the used input type tag or just if there is a way not to hard code this?
By using workflow rule, you can update the lead record type automatically when creation lead from web.
Use the specific criteria as per your business need and update the recordtype of lead.
Example:
If lead is creating from web, then create a worflow rule like
If this helps, Please mark this as best answer
Thank you!!