0

I am trying to migrate our production org to State/Country picklists. I followed the instructions of scanning my org in a Dev sandbox. There was no data to convert because it was a new blank sandbox, so I was able to enable State/Country picklists and tested them successfully in Dev Sandbox. Saving new records worked fine.

I then moved over to our Staging sandbox (Partial Copy SBX) and followed the same procedure, this time however there was data to convert so I went through the long and painful process of mapping each individual country and state value from the old "bad" values to their new acceptable State/Country picklist values. When I was finished with this process, I clicked "Finish and Enable Picklists", and waited for the process to complete.

Once it was complete, I went to the account object and verified that the State/Country picklists were showing on the page. However, upon editing OR creating a new record, I am met with the following error every time, regardless of if I am editing an existing record or trying to add a brand new account record.

Invalid State Code

The BillingStateCode field contains New Jersey, which isn't an available state. Your administrator can add it for you.

Here is what the values look like on the New Account data entry page: enter image description here

and here is the standard state field that comes with State and Country Picklists, showing that New Jersey is valid, active, and visible:

enter image description here

I then figured maybe there was just a workflow rule or process somewhere that might be interfering with or changing the value before saving, so I tried to add a lead instead. Same error "New Jersey" is not an available state. Contacts, same issue. I've tried multiple states to make sure it wasn't a New Jersey only issue. It appears to throw the error with any country/state combination - I even tried Canada/Ontario, same error.

I'm obviously missing something here. Our full copy sandbox has encountered the same problems, so it's not specifically isolated to this one org. I've googled relentlessly and have come up empty - I don't know where to turn and figured I would come here to make sure I am not missing something obvious before reaching out to Salesforce support. Does anyone know what I'm doing wrong?

0

After a lot of digging around, this ended up being an issue with a specific AppExchange App called AddressTools that was trying to standardize the data in the Country/State fields and for some reason was trying to update the BillingStateCode field instead of the BillingState field with the fully qualified state name, resulting in the error BillingStateCode field contains 'FULL NAME' which isn't an available state.

Disabling the triggers for this app resolved the issue, which led me to dig further into the app and realize that the "ISO standard" fields in the data set were actually not ISO standard. Updating them resolved the issue.

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.