function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve BurkeSteve Burke 

Capture Geolocation of device when creating new activity in Salesforce1?

Hi There,

It was recommended in the Success Community that I come here.

We are hoping to automatically capture the geolocation of a mobile device when a new Task/Call is created in Salesforce1.

Ideally, an on-screen field that would be read only and would auto populate.

I have managed to get an on-screen popup by incorporating this visual force page as a mobile card - https://developer.salesforce.com/forums/?id=906F0000000AwiFIAS

But can't figure out how to 'capture' this information.

Basically, by the end of a day, we would like to be able to plot/see on a map where our reps had created Activity(task/call) records following client visits.

We have found a number of applications like this on the app exchange, though I am reasonably positive my basic requirement can be handled without buying add on applications/functionality.

My logic being that if I can get the device coordinates to display, surely they can be captured.

Any assistance would be greatly appreciated!
 
Thanks,
Steve
Terry GrayTerry Gray
Let me preface this by saying I'm not super-techie....but we just did this for a similar use case by using the HTML5 Geolocation API.  Do a google search on that and I bet you will be on your way.  
AchtungAchtung
Coincidentally, I have the same requirement here: https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005PjlQAE.

Though the missing part is on how to parse and save the values as well into my custom fields.

Any suggestions?