+ Start a Discussion
David Zhu 8David Zhu 8 

Visualforce Page error: Invalid State Code Invalid state specified for field

I have Sandbox on CS4. It started getting error message: "Invalid State Code Invalid state specified for field" this Monday on one of my visual force page. Instead of showing the correct infomration on the page, it only shows this error message on the screen.

The page was fine in the past even on last Friday. There was no change in the last week. This sandbox is only used by me.

My Visualfoce page actually uses google map which could cause this error.  I tried debug in Salesforce and Developer tool in Chrome but no indication of such error.

I search my code,validation rule, trigger, workflow rule, and there is no place to display such error message.

The only change I noticed is SFDC upgraded this sandbox to Windows'16.

Does any one experience the same issue?

Thanks,
David

 
SandhyaSandhya (Salesforce Developers) 
Hi David Zhu,

Usually, this error occurs when 
Your state code doesn’t match an existing state.

Please refer below links.

https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_state_country_picklists_errors.htm&language=en_US
 
https://help.salesforce.com/HTViewSolution?id=000220089
 
Still, as you said it was working before there might be something else causing this error.You can reach Salesforce support and log a case regarding this using below link.

https://help.salesforce.com/apex/HTViewSolution?id=000123530&language=en_US

Hope this helps you!

If this helps you, please mark it as solved it will make available for others as a solution.

Thanks and Regards
Sandhya