Loading
Feature degradation | Gmail Email delivery failureRead More

Pass a Record Type through Web-to-Case or Web-to-Lead Form

Publish Date: Oct 13, 2022
Description

How can I pass a record type through a Web-to-Case or Web-to-Lead form?

Resolution


You can use the Web-to-Case or Web-to-Lead forms to designate a specific record type for each of the records submitted through your forms.

By inserting the ID of the record type where you find the Xs below, the record type will automatically be selected upon creation of the record.
 

<input type=hidden name="recordType" id="recordType" value="XXXXXXXXXXXXXXX">
 

This will select the record type when the new record is created and will override the default record type of the user it is assigned to. It is recommended to use the 15-character Id of the record type.

Note: To keep the record type on the submitted form make sure that the option Keep the existing record type is selected as your record type setting:
 

For Leads

In Salesforce Classic: Setup | Customize | Leads | Lead Settings 
In Lightning Experience: Setup | Feature Settings | Marketing | Lead Settings

or

For Cases

In Salesforce Classic: Setup | Customize | Cases | Support Settings 
In Lightning Experience: Setup | Feature Settings | Service | Support Settings

Knowledge Article Number

000385236

 
Loading
Salesforce Help | Article