Loading

Error 'Salesforce could not create this Lead' on Web-to-Lead Record Submission

Julkaisupäivä: Sep 25, 2025
Kuvaus

After setting up Web-to-Lead 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 two primary reasons for this error:

"Reason: Use one of these records?" 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 prevent malicious form submissions from creating numerous bad records.

"Reason: A country must be specified before specifying a state value for field." This error occurs when 'State and Country/Territory Picklist' is enabled in your Salesforce organization. If the standard 'State' and 'Country' fields are used on the Web-to-Lead form, and a user enters a value in the 'State' field without selecting a 'Country,' the submission will fail. This is because 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 is not carried forward to the Web-to-Lead form, so the 'State' field will show all available states regardless of the 'Country' selected. If a user selects a state that doesn't belong to the country they are trying to select, the lead will not be submitted successfully.

Ratkaisu

To resolve these errors, you can take the following actions:

  • For "Reason: Use one of these records?"

    • If you understand the risks, you can deactivate the standard Lead Duplicate Rules and Lead Matching Rules.

    • To deactivate Duplicate Rules:

      1. Click the gear icon and then click "Setup".

      2. In the Quick Find box, enter "Duplicate Rules" and click on "Duplicate Rules".

      3. Click "Standard Rule for Leads with Duplicate Contacts" and then click "Deactivate".

    • To deactivate Matching Rules:

      1. In the Quick Find box, enter "Matching Rules" and click on "Matching Rules".

      2. Click "Deactivate" next to "Standard Lead Matching Rule".

      3. Click "OK" on the prompt that appears.

  • For "Reason: A country must be specified before specifying a state value for field."

    • 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.

    • It is important to note that Salesforce support does not support HTML coding and that responsibility falls on the webmaster or web developer.

  • Other Notes:

    • This error can also be caused by a field on the Lead object being set as unique.
      Error: 'Salesforce Could Not Create This Lead'

    • If you are using existing HTML code, leads will come through without updating the API code to a picklist (Country) field as long as the text format for the country used by the customer is the same.

Knowledge-artikkelin numero

000386751

 
Ladataan
Salesforce Help | Article