All Projects → mattandneil → statecodes

mattandneil / statecodes

Licence: other
Automatically creates all ~5000 values for state and country picklists

Programming Languages

Apex
172 projects
Deploy to Salesforce This tool initializes all ISO states by screen scraping the forms in setup.
(State and Country picklist values cannot be created any other way)

Install

Verify

Inspect the State and Country picklist values before, during, and after starting the batch:

Modify

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:

  1. Install the package in sandbox, not production
  2. Go to Installed Packages > Configure > Run Batch
  3. 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>
    
  4. In Workbench, go to Migration > Retrieve, use package.xml
  5. Download the result and unzip its contents into a new folder
  6. Open the Address.settings file in your text editor
  7. Replace all <active>false</active> with <active>true</active>
  8. Replace all <visible>false</visible> with <visible>true</visible>
  9. Save changes, then zip up the exact contents of the folder again
  10. 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].