3

As an attempt to solve this problem, I've copied the various values in the standard country picklist field to a backup text field so we could go back and clean up later. Now I'm trying to delete all the values in the country/state picklists that don't match the salesforce provided list.

Problem is, I get the same error message about incorrect state/country values when I just try to delete the selection from the country/state picklist field, whether on the edit page or through a data load. This despite the fact that the field is not required on any of my page layouts.

For example, using DemandTools I set the value of the BillingCountry, Billing Country Code, and Billing State/Province and its code, all to constant blank values - but I get the error message saying it doesn't recognize the state/country.

Does anyone know how to wipe out the country values in the standard field in a way that won't give an error message, and act like a newly created record where no value has been entered yet?

  • "For example, using DemandTools I set the value of the BillingCountry, Billing Country Code, and Billing State/Province and its code, all to constant blank values - but I get the error message saying it doesn't recognize the state/country." Wait, really? If you set BOTH text and code vals to null on the same save, that should work. Can you send me your case ID? – Carolyn Grabill Mar 13 '14 at 18:03
  • The case was closed the other day as I went with the disabling picklists suggestion. But I'll re-enable tonight and reconfirm my claim. – smohyee Mar 13 '14 at 21:19
  • Please let us know how it goes. Disabling the feature to clean your data will work, but I think it's overkill for this problem. – Carolyn Grabill Mar 14 '14 at 18:40
  • Carolyn, I re-enabled picklists and retested on a few contacts. Read my post as an answer below so I can use formatting! – smohyee Mar 17 '14 at 14:56
1

I submitted a case to Salesforce. Their suggestion was to disable the State/Country Picklist first, copy the text values over to the backup field, clear out all the incorrect values out of the standard field, then re-enable the picklist.

Which seems sensible, assuming the change doesn't go screwing up all the reports and whatnot. I shall report back after I've tried it.

| improve this answer | |
1

As of Summer '17 (API 40.0) admins and developers still have no way to delete custom State and Country/Territory Picklist entries. To request the ability to delete unwanted entries, please upvote this idea, "Allow deletion of state and country in 'State and Country Picklist'".

| improve this answer | |
  • I voted for this idea – smohyee Jun 29 '17 at 15:01
0

Edited to give a TL;DR Summary

Test Record 1:

  • CountryCode: Null
  • Country: Null
  • Country (text only): Madagascar (ie, a value that exists on the picklist)

Error when attempting to edit/save another field in SF.

No error when attempting to update another field value using DemandTools. AND, when I went back into SF, I saw that the country/countrycode values where automatically updated based on the country (text only) value, and I didn't get errors in SF anymore. Cool!

Test Record 2:

  • CountryCode: Null
  • Country: Null
  • Country (text only): Brasil (ie, a mispelled value that doesn't exist in the picklist)

Error when attempting to edit/save an unrelated field in SF. ALSO got an error for the same reason when using DemandTools. Further, could not update country and countrycode values to NULL using DT, as I got the same error:

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

Problem is, as I see it, is that both DemandTools and SF DataLoader do NOT give you access to update the country (text only) value, so you can't prevent this old value from generating errors by deleting it.

One workaround I came up with was to create a country in the picklist with code 'XX' tied to country named 'UNKNOWN', and just updated records to that, instead of to null values. What would be ideal, however, is if the country (text only) value could remain with its pre-enabled picklist value, and so long as the countrycode and country fields show as null then allow edits to be made to records without giving the error.

Sorry for the delayed response, hope this helped, and would appreciate your feedback on whether this is working as expected. It's exciting to know that SF staff pays attention to this stuff!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.