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
Tom Keefe 2Tom Keefe 2 

Staee/Country Picklist Validations via APIs

Hi Everyone,

Currently we have the front end State/Country picklist validation settings turned on within our SF instance. Which means Records with a Country of USA need to have a valid state i.e. California and not something inaccurate such as Montreal. By having this turned on records with mismatched values are prohibited from being created.  

We want to build an API to send over new Lead Record data based on a form submission. Does anyone know if this same State/Country validation extends to record creation via an API?

Thanks
Tom
John TJohn T
Hi Tom,

You are going to want to validate the Country/State relationship in the form, prior to submission. Until the form is submitted, Salesforce isn't going to know about the Country/State mismatch

John