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, triggering 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. Note that 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 deactivating.
Click the gear icon and then click Setup.
In the Quick Find box, enter "Duplicate Rules" and click Duplicate Rules.
Click Standard Rule for Leads with Duplicate Contacts and then click Deactivate.
In the Quick Find box, enter Matching Rules and click Matching Rules.
Click Deactivate next to Standard Lead Matching Rule.
Click OK on the prompt that appears.
Since 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. If 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. The Country field acts as a controlling picklist and the State field acts as a dependent picklist when State and Country/Territory Picklist is enabled. 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:
Create custom "State" and "Country" fields on the Lead object and use those on the Web-to-Lead form instead of the standard fields.
Make the standard "Country" field a required field using HTML coding on the Web-to-Lead form, not Salesforce Validation Rules.
Contact your webmaster to implement the dependency between the "State" and "Country" fields on the form using JavaScript or another advanced web technology.
Note that 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:
Click the gear icon, then click Setup.
In the Quick Find box, enter "Web-to-Lead" and click Web-to-Lead.
Confirm the feature is enabled. If the form should no longer be active, deactivate Web-to-Lead or take the HTML form offline rather than leaving it live against a disabled setting.
This error can also be caused by a field on the Lead object being set as unique. Duplicate values submitted in that field will fail the same way. To resolve, 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. Review any before/after insert triggers on Lead for conversion logic if the causes above don't apply.
If you are using existing HTML code, leads continue to come through without needing to update the form's API code to a picklist Country field, as long as the country value entered matches the text format Salesforce expects.
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.