function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tasia Demuth 4Tasia Demuth 4 

State/country picklist different on leads vs. contacts?

Hi community!

I am having an interesting issue. Our Salesforce instance is integrated with our company website. We are a subscription-model company selling content, so we sync contacts up to our website to determine which contacts have web accounts and also what these contacts have access to. 

I am seeing a weird thing where I am getting errors for leads regarding the state in the state/country codes for leads only. So contacts are syncing all right, but leads seem to be erroring out. 

But, I thought the state/country picklist was universal for the instance so that does not make much sense to me. Am I wrong in that assumption? 

Any thoughts would be greatly appreciated. 

Hi Tasia,

Ideally yes, if you are capturing data into the standard address fields, it uses the Salesforce state/country picklist. Could you post the error here for better understanding. 

Br, Dev
Tasia Demuth 4Tasia Demuth 4
Yes absolutely. The error is appearing in Drupal. 

Here is the error: 

Message: Salesforce push failure. Please see the logs for more details
Result: [{"message":"There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: State/Province","errorCode":"FIELD_INTEGRITY_EXCEPTION","fields":["State"]}]
Request: PATCH /services/data/v35.0/sobjects/Lead/Custom_Email__c/will%2Eholloway%40clickfox%2Ecom HTTP/1.0 Authorization: OAuth 00D300000006Iw4!ARUAQDdd8ywqg3TvOtSYdVuc67Jbt.FKtf2tKbOqU6TjwGvtrlC1pL35lt_9n9guvFEO3e9oKLfd902cA5i015FtWYeXEf8l Content-type: application/json User-Agent: Drupal (+ Host: Content-Length: 1003 {"FirstName":"William","LastName":"Holloway","Email":"","Web_Phone__c":"7703134269","Country":"US","City":"Denver","Street":"3334 Milwaukee Street","PostalCode":"80205","State":"CO","Web_User_Name__c":"","web_c_BEA_Newsletter__c":null,"web_c_BCS_Newsletter__c":null,"web_c_dsmi_c__c":null,"web_c_DSM_Newsletter__c":null,"web_c_Monday_Events__c":null,"web_c_RES_Newsletter__c":null,"web_c_Tech_News__c":null,"web_c_E_News__c":null,"cat_c_Conferences__c":"Subscribed","cat_c_Prospecting__c":"Subscribed","web_c_JHub_Newsletter__c":null,"Company":"ClickFox","web_c_market_research_insights__c":null,"Topical_Alerts__c":null,"web_c_Measure_Insights_Newsletter__c":null,"web_c_Solar_Customer_Project__c":null,"Web_Account_Created_Date__c":"2018-09-28T16:30:00-06:00","webcCXNewsforCXStrategists__c":null,"webcCXNewsforCustomerCareSpeciali__c":null,"webcCXNewsforWebandMobileManager__c":null,"webcCorporateCommunicationsNews__c":null,"Topical_alerts__c":""}
Alain CabonAlain Cabon
Hi Tasia,

The problem could be a misleading error message because it is a FIELD_INTEGRITY_EXCEPTION for the states/countries of the data of the contacts and those of the leads after the conversion but here, you don't have already converted your leads?
Tasia Demuth 4Tasia Demuth 4
Right! I have not yet converted the lead. So, it is confusing. I wouldn't think it would be throwing this error. And what is weird, is it happens fairly rarely, so I am unsure what the pattern is.