function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cole M BennettCole M Bennett 

web to lead - country error

Greetings All - we currently have Web-to-lead operational at our org, and recently came across errors related to the country attribute.  Our team at  Marketing Edge can enter into the web form, but once it comes over to Salesforce, we get the following error message from Salesforce, and currently, no loads are being generated:

"Subject: Salesforce Could Not Create This Lead

Salesforce could not create this lead because of the reason listed below. For more information about this error or help with Web-to-Lead, please contact Customer Support.

 

Reason: There's a problem with this country, even though it may appear correct. Please select a country/territory from the list of valid countries.

    Lead Capture Page: https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8

 

Record Information

    00N37000003sAbP = Unclassified-Other

    00N37000003sIl3 = 

    city = North Brunswick

    company = Marketing Edge Group

    country = USA

    email = test20180813@marketingedgegroup.com

    encoding = UTF-8

    encoding = UTF-8

    first_name = test 11:48am

    last_name = test

    lead_source = Web

    oid = 00D37000000KMXI

    orgid = 00D37000000KMXI

    phone = 

    state = New Jersey

 

To incorporate this lead into salesforce.com you can key in the data above.

If you have any questions, please click on Support at the top right of any page within salesforce.com.

 

Customer Support

salesforce.com"

Please advise on how I can correct the web form or application on our end.

Thanks!
-cmb

Raj VakatiRaj Vakati

This occurs when State and Country values that do not exist yet in Salesforce are inserted to the database. Go to salesforce setup and 
  • From Setup, enter State and Country Picklists in the Quick Find box, then select State and Country Picklists.
  • On the State and Country Picklists setup page, click Configure states and countries.
  • Select from the following options:
  • Active
  • Makes the country available in the Metadata API so that records that contain the country can be imported. However, unless you also set it as visible, the country isn’t available to users in Salesforce.
  • Visible
  • Makes the country available to users in Salesforce. A country has to be active before you can make it visible.
  • Click Edit to view and edit details for the country, including to configure its states or provinces.
  • (Optional) Under Picklist Settings, select a Default Country. The Default Country automatically populates country picklists for new records in your org, but users can select a different country. Default countries must be both active and visible.
  • Click Save to save your configuration.

Refer this links 
https://help.salesforce.com/articleView?id=000188444&type=1

https://help.salesforce.com/articleView?id=admin_state_country_picklists_configure.htm&type=5
 
Cole M BennettCole M Bennett
Thanks Raj!  We currently have all countries active in the setup.  Please see attached and let me know if you any other thoughts.

-Cole

User-added image
Raj VakatiRaj Vakati
Problem is. .
  • Salesforce user D&B country list
  • If your salesforce coutry state picklist values are not matched to the list you will get this error 
  • Talk to salesforce support for further info
Cole M BennettCole M Bennett
Thanks.  I will get a ticket submitted to support.