I would like to get values for Address.Setting Metadata Component in Salesforce.There are stored all country and state ISO codes.
<?xml version="1.0" encoding="UTF-8"?>
<AddressSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<countriesAndStates>
<countries>
<active>true</active>
<integrationValue>Andorra</integrationValue>
**<isoCode>AD</isoCode>
<label>Andorra</label>**
<orgDefault>false</orgDefault>
<standard>true</standard>
<visible>true</visible>
</countries>
<countries>
<active>true</active>
<integrationValue>Yhdistyneet Arabiemiirikunnat</integrationValue>
<isoCode>AE</isoCode>
<label>Yhdistyneet Arabiemiirikunnat</label>
<orgDefault>false</orgDefault>
<standard>true</standard>
<visible>true</visible>
</countries>
Is there a way to "query" this data, i mean, for example, passing Andorra to get related ISO code "AD".
<countries>
<active>true</active>
<integrationValue>Andorra</integrationValue>
**<isoCode>AD</isoCode>
<label>Andorra</label>**
<orgDefault>false</orgDefault>
<standard>true</standard>
<visible>true</visible>
</countries>
I don´t want to turn on the Salesforce Feature named "Country and State picklist". I want to access with apex code the metadata file that is used to implement this feature(xml above is coming from there). This metadata file is named:"address.settings"
Do i need to use metadata Api?
How i can accomplish that?
Thanks in advantage for any advice.