+ Start a Discussion
Rohit TripathiRohit Tripathi 

Calling Google Maps as Link in Standard Account Detail Page !!!

I have added Google maps via Visual Force page in Account Page Layout to display location of account on map and it is working absolutely fine. I want to add same Visual Force page as link on account page layout. For this, I have created a new formula field and used HYPERLINK funtion as:

HYPERLINK("https://c.na24.visual.force.com/apex/LocateAccount?id={!Account.ID}", "map")

but this link is not working and throwing error message : Id value is not valid for the Account standard controller

when I manually add ID value to URL, then it displays location correctly like :

HYPERLINK("https://c.na24.visual.force.com/apex/LocateAccount?id=0011a00000Bw8o5", "map")

Is there anyway to make it dynamic so that it picks the ID for current account.

 
Best Answer chosen by Rohit Tripathi
Vivek DeshmaneVivek Deshmane
Hi Rohit,
Please try below formula and let me know.
HYPERLINK("https://c.na24.visual.force.com/apex/LocateAccount?id="&Id, "map")

Best Regards,
-Vivek

All Answers

Vivek DeshmaneVivek Deshmane
Hi Rohit,
Please try below formula and let me know.
HYPERLINK("https://c.na24.visual.force.com/apex/LocateAccount?id="&Id, "map")

Best Regards,
-Vivek
This was selected as the best answer
Rohit TripathiRohit Tripathi
@vivek : it worked. thanks a lot.