Custom Map Object – Salesforce Integration

Nice work! You’ve successfully set up a custom object for use in Geopointe. Now we want to make the custom object experience just as fluid as it is with a standard object. This document walks through the same steps at the standard integration document, but runs through how to create them for these custom objects. This doc includes directions to:

Creating a Custom Object Map Button

If you use the Map button on the records, then you will certainly want to include it on your custom objects as well. We’ll start by creating a custom button. Navigate back to Salesforce setup. Go to Customize | [Object Name] | Buttons, Links, and Actions for a standard Salesforce object or Create | Objects | [Custom Object Name] | Buttons and Links for custom objects. Scroll down to the Custom Buttons and Links section and create a new one.

You’ll be taken to the button edit screen. The important settings are the label (which should auto-populate the name), the display type set to a “Detail Page Button,” and that the behavior is set to your preference (either in an existing window or a new window). A screencap of these settings can be seen below:

Lastly, you need to add the code for the map.  The required code is in the box below. Note: Change Object_Name__c to the appropriate object, either the Salesforce object or the Custom object with its __c ending.


It’s always good practice to check for Syntax errors. Once you have done so, go ahead and click Save. The button is now ready to be added to a page layout.

Creating a Custom Object Map Records Button

The Map Records button has a very similar process to the Map button, but the selections are quite different. This time you’ll set it as a list button and its behavior will be to execute javascript. The screencap is below:

The code for the Map Records button is a bit longer than the Map button as well. You can find it in the box below. Note: Again, change Object_Name__c to the appropriate object, either the Salesforce object or the Custom object with its __c ending.

// Get data array
idArray = {!GETRECORDIDS($ObjectType.Object_Name__c)};
// Submit URL
f=document.createElement('form'); = '_blank';f.action='/apex/geopointe__Map';
f.method = 'get';
i= document.createElement('input'); = 'idArray'; = 'idArray';
i.type = 'hidden';
i.value = idArray;

Check your syntax and click Save. This button will now be available for you to add to list views. If this button does not work for you, email us and we will help you get the button set up properly; you may require some additional coding and we’d be happy to help you make it work in your Salesforce environment.