1


I am updating records through batch class. I have state/Country picklist enabled for my ORG, however for few set of records BillingState picklist is having following values

       i. UNKNOWN VALUE
       ii. --None--

I am facing following error when updating the records having above two values

Error: There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.

Please advise how I should address this problem?

Thanks,
Nachiket

  • hope this helps: help.salesforce.com/articleView?id=000220089&type=1 – coderdecoder Jan 6 '17 at 10:41
  • Yeah I went through this already, but problem is the values are already updated after conversion to state country pick-list and my client ain't be going to update data for state/country picklist in production org so I need a way to somehow map these values so that user should not face this issue while updating records. – Nachiket Deshpande Jan 6 '17 at 10:57
  • And I didn't understand here how these two values are added in picklist, --None-- and Unknown Value – Nachiket Deshpande Jan 6 '17 at 11:02
  • I was going through this Blog, adminhero.com/implementing-state-country-picklists-part-2 and there it has mentioned in the note about mapping NOTE: If you are unsure of the mapping for a particular country value, select Unknown Value for the mapped country. This will allow you to proceed with the mapping, and after implementation, present the user with an error message and request the data to be updated when the record is edited. – Nachiket Deshpande Jan 6 '17 at 11:16
  • But I am still unsure about how --None-- value is added to picklist – Nachiket Deshpande Jan 6 '17 at 11:18
0

Before some days I faced the same issue while fetching the data from third party system and that all values in German and I need to set it into English so, I wrote Apex trigger for before insert event,

First of all check from where this value is being populate and I suggest you to use Apex Trigger to modify your value.

| improve this answer | |
0

I was reading some stuff online and went through the mapping for State/Country picklist in my ORG and I observed the following

enter image description here

So few of the picklist values are mapped with Unknown Value that's why error is getting popped-up when these records are getting updated from BATCH class, however I am still figuring out way for
"--None--" option.

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