September 30, 2021

Salesforce System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.:

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.:

Code which causes the error:
Account objAcc = new Account();
objAcc.Name = 'Testing Account';
objAcc.BillingCountry = 'United States';
objAcc.BillingState = 'WA';
objAcc.BillingPostalCode = '54321';
insert objAcc;


State should not have abbreviation. Use Washington to resolve the issue.


No comments:

Post a Comment