Skip to content

Enable QuickComplete Country

Overview

QuickComplete Country gives each user a default country, so the country field fills itself in rather than being typed on every record. It benefits users who work with addresses in a single country, as it removes the need to type the same country repeatedly.

The default is stored per user, in a field on the User record, so different teams can have different defaults.

It works in two ways:

  • On save, any record whose address block holds values but whose country is empty has the default country populated. By default, this runs on every save, whether or not the address itself was edited.
  • While typing, a link appears beneath the country field in the AddressTools component and the AddressTools Override. Clicking it populates their default country.

Before You Start

A default country has to be installed onto your user records first. That is the third step on the Installation tab of AddressTools Administration, and it needs the reference data to be in place. See Install Country Data.

Step 1: Install a Default Country

  1. Click the App Launcher to search for and select AddressTools Administration.
  2. Stay on the Installation tab, which opens by default.
  3. Find the Default Country Installation step.
  4. Choose a country from the picklist.
  5. Click Install.

The country is written to pw_ccpro__QuickCompleteCountry__c on every User record. This runs in the background, so how long it takes depends on how many users you have.

Note

If the picklist is empty, the reference data has not been installed yet. Run the data installation, then refresh the page.

Step 2: Turn QuickComplete Country On

  1. In AddressTools Administration, select Settings from the left menu.
  2. In the Feature Enablement section, click the pencil icon beside QuickComplete Country Enabled.
  3. Select the checkbox, then click Save.

Changing a User's Default

The installation sets the same default for everyone. To give an individual user a different one, edit the field on their User record.

  1. Add QuickComplete Country (pw_ccpro__QuickCompleteCountry__c) to the User page layout, if it is not there already.
  2. Navigate to the user's record and click Edit.
  3. Enter the country name in QuickComplete Country.
  4. Click Save.

Note

QuickComplete Country is a text field and accepts any value, so enter only country names installed in your org. A value that does not match an installed Country record can cause AddressTools validation to reject the record. See Enable Validation Rules.

The link beneath the country field only appears in the AddressTools interactive components, so add at least one of them if you want your users to be able to click their default rather than relying on the on-save behaviour. See Add the AddressTools Component to a Lightning Record Page and Enable AddressTools Override for New Records.

The on-save behaviour needs neither, as it runs through the object's trigger. See Activate Triggers.