(State and Country picklist values cannot be created any other way)
- Install the package: /packaging/installPackage.apexp?p0=04t4J000000tIvu
- Go to Setup > Installed Packages > State Codes, then click Configure
- Review the included ISO state codes then click Start Batch
Inspect the State and Country picklist values before, during, and after starting the batch:
After the package creates all the state codes and state names, the values must be permanently activated using Workbench or an IDE connected to the org. Follow these steps in sandbox before attempting in production:
- Install the package in sandbox, not production
- Go to Installed Packages > Configure > Run Batch
- Use any text editor to create a package.xml file:
<?xml version="1.0" encoding="UTF-8"?> <Package> <types> <members>Address</members> <name>Settings</name> </types> <version>45.0</version> </Package>
- In Workbench, go to Migration > Retrieve, use package.xml
- Download the result and unzip its contents into a new folder
- Open the Address.settings file in your text editor
- Replace all
<active>false</active>
with<active>true</active>
- Replace all
<visible>false</visible>
with<visible>true</visible>
- Save changes, then zip up the exact contents of the folder again
- In Workbench, go to Migration > Deploy, and deploy the new zip file
While we can't provide ad-hoc support for this code, please contact us with your company
name and address if you need a warranty for its use and we will assist: www.xbaf.com/contact