Populate Fields Using Map Lookup Mode

Check out this video to see this feature in action, and learn how to configure it from the steps below:

Using a custom button, you can launch the map into "Lookup Mode" and populate fields using data from the Map. This provides an efficient way to associate two records by looking at them geographically, supporting processes such as:

  • Assigning the closest delivery or service center to a record
  • Defining a relationship between two records (e.g. "Related Account")
  • Identifying the central office that a record is assigned to
The method below allows a user to use their own judgment when selecting a record, but you can instruct the system to automatically choose the closest record using Proximity Searching Via Apex.

Scenario: In this document, we'll populate a field on Account with the closest Service Center on the Map. To achieve this, we created the following URL for our custom button:
&wbbuttonText={!URLENCODE("Assign Service Center")}

Let's break it down

Start with the basic Map Button URL, which launches the Map to the location of the starting record.

Pro Tip: You can run a search manually, or you can add more search parameters to specify the data search to automatically appear on the Map. In this example, additional parameters in the first section of the URL instruct it to launch a certain data set with a specified radial search.

Now add the write-back parameters:

wbRecordId is the ID of the record we will be writing back to

wbLookupObject is object type that we will be searching for and populating the lookup field for. In this case, the Service Center object.  

wbField is the field on that record we will be populating.
wbLookupObject is the object type that we will be searching for and populating the lookup field for.
&wbButtonText={!URLENCODE("Assign Service Center")}

wbButtonText is optional, but can be included if you want to customize the button’s text. It is recommended to use the URLENCODE function when specifying your text, especially if you are merging in data from the system.

Creating the Button

1. In the Object Manager, create a custom button for the object where you want the look-up button to be displayed.

2. Enter a name and display name and select Detail Page Button for Display Type.

3. In the text editor, enter the URL you created based on the instructions above.  Click Save and add it to the object's layout.

See Lookup Mode in Action

To use this custom button, navigate to a record page and click the button you created. The Map page launches. Load a data set if necessary, and click a record on the Map that you want to populate the field with. You should see the custom button you created, highlighted in blue.

When you click the button, the originating record page will automatically load, with the field populated accordingly.

Learn More

URL Parameters - For more information on write-back parameters, review the Map as Lookup section in this document. 
Creating URL Parameters - See specific examples of other custom buttons you can create using parameters. 
Apex API - Learn about more powerful ways to automate processes in Geopointe.