After setting up Web-to-Lead in Salesforce and adding the code to a website, a system administrator may receive an email with the error message "Salesforce could not create this lead because of the reason listed below." This email is sent to the Default Lead Creator and cannot be customized.
There are several reasons this Web-to-Lead error occurs, all of which are explained in this article along with steps to resolve them.
This article explains how to resolve the most common causes of the "Salesforce could not create this Lead" error on Web-to-Lead form submissions: duplicate rule blocks, missing Country values on State and Country/Territory Picklist fields, a disabled Web-to-Lead interface, and unique field conflicts.
This error occurs when a submitted lead form has information that matches an existing lead record in Salesforce, which triggers a duplicate rule. This is a preventative measure to stop malicious form submissions from creating numerous bad records.
If you understand the risks, you can deactivate the standard Lead Duplicate Rules and Lead Matching Rules in Salesforce. Deactivating these rules removes duplicate protection for your entire org, not just for Web-to-Lead submissions. Consider whether a narrower duplicate rule exception fits your org better before you deactivate them.
This error is partly a defense against malicious or bot-driven submissions. Adding CAPTCHA or reCAPTCHA to the public-facing Web-to-Lead form is recommended to reduce spam-triggered errors at the source, rather than relying solely on deactivating duplicate protection.
This error occurs when the State and Country/Territory Picklist feature is enabled in your Salesforce org. The standard State and Country fields are used on the Web-to-Lead form, and a customer enters a value in the State field without selecting a Country. The submission fails.
When State and Country/Territory Picklist is enabled, the Country field acts as a controlling picklist and the State field acts as a dependent picklist. However, this dependency does not carry forward to the Web-to-Lead form, so the State field shows all available states regardless of the Country selected. If a customer selects a state that does not belong to the country they chose, the lead is not submitted successfully.
To resolve this, try one of the following:
Salesforce Support does not support custom HTML coding. That responsibility falls on the webmaster or web developer.
This error occurs when the Web-to-Lead interface itself has been disabled at the org level. Any submission through the form fails with this message, and a public-facing form can generate a large volume of error emails in a short time.
To resolve this:
This error can also occur when a field on the Lead object is set as unique. Duplicate values submitted in that field fail the same way. To resolve it, go to Setup > Object Manager > Lead > Fields & Relationships, locate the field, and remove or adjust the "Unique" constraint if it is not strictly required.
If an Apex trigger converts the Lead automatically on insert, it can conflict with the Web-to-Lead creation process and produce this error. If the causes above don't apply, review any before/after insert triggers on Lead for conversion logic.
If you use existing HTML code, leads continue to come through without a form update to a picklist Country field. This holds as long as the country value entered matches the text format Salesforce expects.
The email goes to the Default Lead Creator. You cannot customize the email.
Yes, partly. You can create custom "State" and "Country" fields on the Lead object and use them on the form. Making the standard Country field required, or syncing the two fields, needs HTML or JavaScript changes by your webmaster.
000386751

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.