Loading

Salesforce Maps URL Parameters

Veröffentlichungsdatum: Apr 24, 2023
Beschreibung

You can use Salesforce Maps URL parameters to leverage developer knowledge to customize how Salesforce Maps works in your Salesforce organization. For example, you can create a button that automatically launches Salesforce Maps with a given layer. Note that we provide certain hard-coded URLs, mainly for the sake of giving straightforward examples.

Lösung

Query Parameters

Query parameters take the form of a standard URL with an attached query string.

ParameterExampleNotes
recordId001C000001BSztNId (Single) of the record to plot
recordIds001C000001BSztN,001C000001BSztN,etc...Ids (Multiple) of the records to be plotted
baseObjectIda0bC000000CIRAmIAPMaps Base Object Id
tooltipFieldNameAPI Field
tooltipField2OwnerIdAPI Field
tooltipField3TypeAPI Field
tooltipField4stringAPI Field
tooltipField5stringAPI Field
tooltipField6stringAPI Field
tooltipField7stringAPI Field
tooltipField8stringAPI Field
tooltipField9stringAPI Field
tooltipField10stringAPI Field
tooltipField11stringAPI Field
tooltipField12stringAPI Field
tooltipField13stringAPI Field
tooltipField14stringAPI Field
tooltipField15stringAPI Field
zoominteger between 1 - 18Map zoom level. 18 is the closest zoom (rooftop) while 1 is the furthest (world). 
zoomtofit(true or false)Zoom to a level that displays all records plotted on the map
color#66FF00 (Note that the pound sign will have be escaped. This can be handled with the URLENCODE() Salesforce function.)Color of the marker
layerida0bC000000CIRAmIAP,a0bC000000CIRAmIAP, etcComma separated list of layer Ids
proximityRadiusintegerRadius of Circle
proximityUnit(meters,kilometers,miles,feet,yards)Measurement Unit
proximityAffectMarkerVisiblity(true or false)Only Show Markers Inside Shape



Note:

  • If you need to locate your list of layer Ids, you can do so either by creating a tab for the Salesforce Maps object or you can use SOQL to query all record Ids of the given object.
  • All the above-listed parameters except layerid can only be used when Plotting a Record via a Static URL. When plotting Marker Layer via a Static URL, markers will plot as per the configuration of the marker layer. 

 

Using Query Parameters

Plotting a Record via a Static URL

This example plots a single record with the given base object, tooltip settings, zoom, and color settings.
https://YOUR_SALESFORCE_DOMAIN/apex/Maps__maps?recordId=0014100000gXMTb&baseObjectId=a034100000JEBY7AAP&tooltipField=Name&tooltipField2=OwnerId&zoom=16&color=%2366FF00

 

Plotting a Marker Layer via a Static URL

This example plots a given Marker Layer. Note that you can find this layer id by creating a tab for the Salesforce Maps Marker Layer object and reviewing your layers. At that point, you can get the object ID from the URL.
https://YOUR_SALESFORCE_DOMAIN/apex/Maps__maps?layerid=a0O410000026nIE

Please note In the enhanced user experience, there are subtle changes to how we’re handling URLs to launch Maps - specifically to proximity parameters:

  • if proximityRadius or proximityUnit is included in the URL, proximityOn=true doesn’t need to be included
  • If either proximityRadius or proximityUnit is included in the URL, but not the other, we’ll derive the unspecified value from the user’s settings who launched the URL
  • If proximityAffectMarkerVisiblity is specified in the URL, but proximityRadius or proximityUnit aren’t specified, we’ll derive the unspecified values from the user’s settings who launched the URL



See also:

Nummer des Knowledge-Artikels

000389813

 
Laden
Salesforce Help | Article