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
Trail headTrail head 

Can we add States to the Existing Country using Metadata Api

Am trying to get all Countries(AddressSettings) Using Metadata APi anad wants add some new states to the one of the existing countries using Metadataservice .but its showing Invalid iso code ARA for state Allier in country France.
ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

You can't add/create the new States or Country values using Metadata API as suggested here (https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_state_country_picklists_api.htm#:~:text=You%20can%20use%20the%20Metadata,picklists%20in%20your%20sandbox%20org.).

However,you can only edit the existing States/countries as suggested in the above document.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri