+ Start a Discussion
salesforce@reserveadvisors.comsalesforce@reserveadvisors.com 

Map Nearby - Map Contracts

Hello all! We have Map Nearby currently installed and it works wonderfully. Many of our list views are in the contracts however. I would like to have a map contracts button on a contract list that will map the accounts associated with the contracts using the map nearby app.

 

My current javascript button is as follows:

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
var selecteditems={!GETRECORDIDS($ObjectType.Account)}; 
window.location= "/apex/FN__FindNearbymap?alids="+selecteditems;

 

However, the getrecordids returns the contract ids instead of the account id (i.e. I want it to return Contract.AccountId). No matter what I put, be it Contract.Name or an ObjectType, it always returns the ids associated with the selected contracts. If I can just get it to return the account ids instead, I believe it will work.

 

Thanks for the help!