+ Start a Discussion
Sanjeev R 1Sanjeev R 1 

how to get GPS Location and log it into Activity History of the user

I have a task and calendar event list.. 

What I need is to keep log of the user's GPS location (how to get this GPS location in salesforce), time, date when they click to VIEW  these Task or calendar event... 
How can I keep this record and where ...
is ActivityHistory the right place to store this information 

requesting to please guide me for this...

thanks is advance


For GPS you could use Geolocation features of browsers to determine the location of User, it is not verymuch accurate but it works. Refer http://www.w3schools.com/html/html5_geolocation.asp for how to use this feature.

I think ActivityHistory is not a good place to hold such information as it could be confidential for users and displaying it to all users may not be suitable. Custom VF page as an embedded related list would be best for logging geolocation data of user and viewing date/time. You may need to create new object to hold users login and viewing data.

It is very tricky to get time and date when user views certain record detail page like Task or event on saleforce. I can think of following approach.
You can utilize same VF page (which is holding users data) page by extending standard controller of perticular object. This visualforce page will be having javascript which will make calls ( through javascript remoting) to controller to update records of object which was created to hold users login and viewing data.
Sanjeev R 1Sanjeev R 1

Hello Dev.Ashish,

I agree with you to have a new object to hold this information about User, GPS, Date, etc..... but Activity(Task or Event) does not supports to have a Lookup Custom Field...

I need to see these entries with that particular Task or Event... is their any alternative ways to get this please..


thanks in advance