Blog

AddressTools Premium: Create lookup fields for an address block

Use Create Lookup Fields for a configured address block

When an address block is configured in AddressTools, an option to create lookup fields becomes available. Using this action will create three lookup fields on the object with each of them creating a lookup relationship to the relevant data object installed with AddressTools:

  • Country Lookup
  • State Lookup
  • ZIP Code Lookup

Before going forward, this action cannot be used for address blocks that contain fields from another managed package. If your address block contains fields from a managed package, follow the instructions set out in the next section.

To automatically create the lookup fields for the address block:

  • Go to App Launcher | AddressTools Administration.
  • Select Address Blocks from the sidebar.
  • Click the dropdown arrow on the address block you want to create lookup fields for and then select Create Lookup Fields.
  • Review the confirmation text and select Yes to proceed.

You will now be required to configure the Field-Level Security for the newly created fields. There are a number of ways to configure field-level security, the following steps will show one of these.

  • Go to Setup | Object Manager | [Object] | Fields & Relationships.
  • Select newly generated [Address Block Name] Country Lookup.
  • Select Set Field-Level Security.
  • Check Visible for each profile that will be using the tool.
  • Select Save.

Repeat the above steps for each of the generated lookup fields, [Address Block Name] State Lookup and [Address Block Name] ZipCode Lookup.


Manually create lookups for a configured address block

If you are unable to use the Create Lookup Fields button to automatically create lookup fields for your address block, or if you do not require all of the lookups for the address block, you can create them manually through Salesforce setup.

  • Navigate to Setup | Object Manager.
  • Choose the object that your address block exists on.
  • Select Fields & Relationships and New.
  • Select Lookup Relationship as the Data Type, then click Next.
  • Select either [Country][State] or [ZIP Code] from the Related To picklist, then click Next.

You can provide a field label that works for you, we recommend the format Address Block (Billing) + Lookup Object (Country) + "Lookup". For example Billing Country Lookup.

  • Provide a Field API name of your choice and press Next.
  • Check Visible for each profile that will be using the tool.
  • Select Next, there is no need to add the field to the page layout nor a requirement to have it display in a related list
  • Press Save to confirm the new field.

Repeat the above steps to create all the lookup fields that you require for the address block.

Binding the lookup fields to the address block

With fields now created, they need to be added to the address block. This allows them to work with the associated postal address fields that are entered.

  • Go to App Launcher | AddressTools Administration.
  • Select Address Blocks.
  • Select the Edit action against the address block in question.
  • Scroll to Lookup Fields.
  • Map the lookup fields using the appropriate field picklist.
  • When all your lookup fields have been bound, press Save.

Now the fields are bound to the address block, you’re ready to enable the functionality for the organization!


Back to the AddressTools Premium installation walkthrough

Leave a Reply