Newer Version Available

This content describes an older version of this product. View Latest

Get the Boundary Information

The GetBoundaryInformation() Apex method returns geographical IDs of locations that fit the specified search criteria.

Salesforce Maps works with data providers that supply property data. Periodically, these providers update their data, which can affect custom code. If the providers change their data formats, update your custom code accordingly. Salesforce Maps can update, replace, or remove property data at any time.

Signature

Where,
  • maps is the namespace of the Salesforce Maps package. It’s automatically available when the package is installed.
  • API is the class that contains the global methods exposed to developers.
  • GetBoundaryInformation() is the method.

Sample Code

This code finds the geographical IDs of states in the USA beginning with “A”.

If you invoke methods within a flow, process builder, or trigger, do one of the following to avoid uncommitted work errors.

  • Call the methods through a future method
  • Call the methods as queueable

Different processes refresh the token, such as plotting a route or schedule. The refresh process is almost immediate after each qualifying action occurs.

Warning

Example

Sample Response

Although the return value is an Apex Map<String, Object> object, this JSON response illustrates the essential data you receive in the resulting map.