How to: Populate a Regional Data Field Based on a Country, State or ZIP Entry
Note: Functionality for populating regional data based on a country entry is only available for AddressTools Premium, if you are using AddressTools Free then you can trial our AddressTools Premium application to take advantage of this feature plus many more that it includes.
This example will demonstrate creating a Sales Territory field on the AddressTools Country object that a Lead will then lookup. The same steps can be followed for the AddressTools Country, State and ZIP Code objects provided with the package.
Creating a Custom Text Field on an AddressTools Regional Data Object
The first step is to create a custom text field on the AddressTools Country object.
Navigate to Salesforce Setup | Object Manager | Country | Fields & Relationships | New.
Enter a Field Label and Field Name to meet your requirements, in this example, we’ll enter Sales Territory.
Creating a Formula Field to Lookup the New Field Value
The following section requires regional data lookup fields to be configured within AddressTools. If you have not yet configured lookup fields for your address blocks, see the Configure Lookups section in the AddressTools Premium Installation Guide.
Navigate to Salesforce Setup | Object Manager | Leads | Fields & Relationships | New.
Provide the new field with a Field Label and Field Name (it is recommended to provide a name that matches the field created in the first section of the article).
Choose Text as the return type.
On the formula page select Advanced Formula and then Insert Field.
You will need to select the field created in the first section.
In this example, we choose Lead > Lead Country Lookup > Sales Territory
Note: your lookup field name may differ from the one in this example.
When highlighted, select Insert.
Select Next and provide visibility to all the necessary profiles.
Ensure the field is added to the desired Page Layout.
Now with the formula field created and on the page layout, when the record is saved with a valid country value, the value from the associated country record will now appear in the lookup field.
Using this article, you can now create Country, State and ZIP Code based formula fields for any additional data you wish to add to the Country, State or ZIP Code data installed with the solution!
If you have any questions in relation to this article, contact us at: email@example.com We will be happy to answer any questions or problems that you may have.