Country/State Picklists

Country/State Picklists

Enable Country/State Picklists

  1. set Org/Company Language to English (so the Countries get created in English)

    1. Setup → Company Settings → Company Information → Edit → Default Language

  2. Setup → State and Country/Territory Picklists

  3. click on Scan for Affected Data and Customizations → Scan for State and Country/Territory Data

  4. convert any existing States, Countries and Territories

    image-20250617-091050.png
  5. finish and Enable Picklists

  6. revert Company Language back to the previous value

Use this tutorial for an in-depth guide: https://www.salesforceben.com/implementing-state-country-picklists-in-salesforce-a-tutorial/

Add States

Unfortunately, this needs to be done manually in the Salesforce Setup, one by one.
(Takes approx. 20 minutes)

“Integration Value” does not matter when creating the States and can be ignored.

The translation is deployable after the states have been created:
https://github.com/ANT-Informatik/Kaleido.Kontakte.NPC/blob/main/unpackaged/translations/standardValueSetTranslations/AddressStateCode-de.standardValueSetTranslation-meta.xml

sf project deploy start --source-dir unpackaged/translations/standardValueSetTranslations

Austria

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

Burgenland

1

Burgenland

Carinthia

2

Kärnten

Lower Austria

3

Niederösterreich

Upper Austria

4

Oberösterreich

Salzburg

5

Salzburg

Styria

6

Steiermark

Tyrol

7

Tirol

Vorarlberg

8

Vorarlberg

Vienna

9

Wien

Switzerland

Please note: For the first column (which is supposed to be in English) we use the most current version of a canton name, also used by official publications. Most of the time it is the original name in the native language (DE/FR/IT). The only exceptions are Zurich and Geneva.

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

Aargau

AG

Aargau

Appenzell Innerrhoden

AI

Appenzell Innerrhoden

Appenzell Ausserrhoden

AR

Appenzell Ausserrhoden

Bern

BE

Bern

Basel-Landschaft

BL

Basel-Landschaft

Basel-Stadt

BS

Basel-Stadt

Fribourg

FR

Freiburg

Geneva

GE

Genf

Glarus

GL

Glarus

Graubünden

GR

Graubünden

Jura

JU

Jura

Lucerne

LU

Luzern

Neuchâtel

NE

Neuenburg

Nidwalden

NW

Nidwalden

Obwalden

OW

Obwalden

St. Gallen

SG

St. Gallen

Schaffhausen

SH

Schaffhausen

Solothurn

SO

Solothurn

Schwyz

SZ

Schwyz

Thurgau

TG

Thurgau

Ticino

TI

Tessin

Uri

UR

Uri

Vaud

VD

Waadt

Valais

VS

Wallis

Zug

ZG

Zug

Zurich

ZH

Zürich

Germany

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

State Name

State Code

Active & Visible

German Translation
(via Translation Workbench)

Brandenburg

BB

Brandenburg

Berlin

BE

Berlin

Baden-Württemberg

BW

Baden-Württemberg

Bavaria

BY

Bayern

Bremen

HB

Bremen

Hesse

HE

Hessen

Hamburg

HH

Hamburg

Mecklenburg-Western Pomerania

MV

Mecklenburg-Vorpommern

Lower Saxony

NI

Niedersachsen

North Rhine-Westphalia

NW

Nordrhein-Westfalen

Rhineland-Palatinate

RP

Rheinland-Pfalz

Schleswig-Holstein

SH

Schleswig-Holstein

Saarland

SL

Saarland

Saxony

SN

Sachsen

Saxony-Anhalt

ST

Sachsen-Anhalt

Thuringia

TH

Thüringen

Reference

  • Sextant includes more countries than Salesforce, e.g. EU, Iran, Syria, North Korea, etc.

  • Sextant uses different names for some of the countries

Technical Information

settings\Address.settings-meta.xml

<countries> <active>true</active> <integrationValue>DE</integrationValue> <isoCode>DE</isoCode> <label>Germany</label> <orgDefault>false</orgDefault> <standard>true</standard> <visible>true</visible> </countries>

General

Fields

  • isoCode is used in the CountryCode field (e.g. Account.BillingCountryCode)

  • integrationValue is used in the Country field (e.g. Account.BillingCountry)

    • default value is the value from label

  • label is a required field and cannot be changed (can only be changed manually in Setup)

    • if needed, the display value can also be changed via the English translation

Problems

  • the only field that can be changed via package is integrationValue

  • in order to change the integrationValue field, Address.settings-meta.xml needs to be deployed as part of the package

  • as label cannot be changed, the label value in Address.settings-meta.xml has to match the label value which is already present in the Org

    • if the Org was created in German, the label is also in German, which means Address.settings-meta.xml cannot be deployed, as label cannot change

  • not sure what happens when Salesforce adds/changes countries

    • package deployment might fail if we don’t also update our Address.settings-meta.xml