Is it possible to insert a list of States in Salesforce with the Metadata API? enter image description here


Thank you very much.

Additional Question (02-June-2021@12:11CEST):

I have retrieved the XML file containing the list of States/Countries (it is now stored in C:...\TEST1\force-app\main\default*settings*\

The file name is Address.settings-meta.xml

I have copied/past this file into another sub-directory where I keep a copy of the code of the "Destination Org called DEV1: ...\DEV1\force-app\main\default*settings*\

I was expecting to be able to deploy the XML file with Visual Studio Code + SFDX CLI but, the deployment is not successful: I get an error without details.

Then, I try to deploy the same xml file with Workbench. The deployment is apparently successful BUT when I go to that Org to verify if the States have been deployed... I observe they a have NOT been deployed.

Any input that might help me?

Thank you.

  • 1
    I had to do this recently and used this open-source tool. It worked well but took 10 hours to complete. I'm not affiliated with the authors. Jun 1 at 16:12
  • @DavidCheng Ten hours? That seems... excessive.
    – sfdcfox
    Jun 1 at 16:31
  • @DavidCheng: thank you!
    – Eduardo
    Jun 1 at 16:38