You need to sign in to do that
Don't have an account?
Utriv
Google Maps Not Displayed After Converting Button to List View
I have a following code on the button (detail page button) that works fine from the record. But when I converted the button into the List Button with the same code, it stopped working. My purpose is to display multiple addresses on a map.
Please help.
Thank you in advance!
What does the URL look like when you click the button? I'm not sure what will be made of trying to use merge fields from a single object instance in a list view button, which works on a list of records.
The URL is as follows..
http://maps.google.com/maps?f=q&hl=en&q=+++++++&om=1&lid=00bK0000000MG2Q&eid=&ic=1&retURL=%2Fa0L%3Ffcf%3D00BK0000000Z4fS&wrapMassAction=1&scontrolCaching=1&autoMapValues=1
It displays map but its blank with no address mapped on it.
I am using the following code for my list view button. Anyone please help.
idArray = {!GETRECORDIDS($ObjectType.Establishment_Record__c)};
if (idArray[0] == null){
bContinue = false;
alert('Please select at least one row');
}
if (bContinue){
// Do things based upon the domain we are on
if (hostname.indexOf(".my.salesforce.com") != -1){
usePost = false;
if (idArray.length > 100){
bContinue = false;
alert('When using the My Domain feature in Salesforce, you are limited to mapping 100 records');
}
} else if (hostname.indexOf(".salesforce.com") != -1){
bContinue = true;
usePost = true;
server = hostname.substring(0,hostname.indexOf(".salesforce.com") );
} else if (hostname.indexOf(".force.com") != -1){
bContinue = true;
usePost = true;
server = hostname.substring(0,hostname.indexOf(".force.com") );
}
}
if (bContinue){
// Submit URL
f=document.createElement("form");
f.target = "_blank";
if (usePost){
f.action="http://maps.google.com";
f.method = "post";
} else {
f.action="http://maps.google.com";
f.method = "get";
}
f.submit();
}