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
Dippan PatelDippan Patel 

Lightning Component Error - StateCode and CountryCode picklist value not available


I am using LightningRecordEdit Form. All the fields are displayed correctly in this format 
<lightning:inputField fieldName="{!field.apiName}" class="uiInput uiInput--default"/>

I am getting the error when State and Country picklist is enabled in org. 

Both Picklists are disabled as there is no picklist value available.

inputField.js: Could not find picklist values for field [StateCode] 
inputField.js: Could not find picklist values for field [CountryCode]

Can anybody please help me with the above issue? 

Thank you. 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Dippan,

Mailing address in contact object record is a concatenation of various fields Mailing address [MailingCity+MailingCountry+MailingPostalCode+MailingState+MailingStreet] and could you please check the API name for the fields that you are using in recordEditForm? and if possible could you please share the scenario and code to check-in dev org?

Let me know the details to check further.

SwethaSwetha (Salesforce Developers) 
As per,

Dependent picklists must be defined in your org before you can use them with lightning:inputField. Both controlling and dependent fields must be included in your component.

Can you ensure the state country values are defined and both are included in the component? Thanks