+ Start a Discussion
Nick KeehanNick Keehan 

Salesforce1 Longitude and Latitude Capture

Hi Guys.

I am looking to capture the longitude and lattitude when a lead is updated in salesforce via salesforce1.

  • I originally thought a javascript button would work, aparantly Javascript buttons cannot be used in salesforce1.
  • Visualforce page, I can capture on a VF page however the loading of the VF page via salesforce1 is slow and cumbersome as its not part of the app itself.
Does anyone else have any ideas?

Best Answer chosen by Nick Keehan
SandhyaSandhya (Salesforce Developers) 
Hi Nick Keehan,

You can write the Visualforce page contains JavaScript that captures the device's longitude and latitude when the record is saved. After writing the Visualforce page, you can create a tab for the page and add the tab to the mobile application.

Please refer below recipe given by salesforce developer guide


Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards