You need to sign in to do that
Don't have an account?
srilakshmi1.387861669756762E12
how to get current location of user in sales force
i think in Manage Users->users->Locale Settings->Locale is the current location of sales force user can ant one suggest is it corret or not please
https://developer.mozilla.org/en/docs/WebAPI/Using_geolocation
any one see this code may be helpfull to you
<apex:page standardController="Candidate__c" id="page">
<p><button onclick="geoFindMe()">Show my location</button></p>
<p id="out"></p>
<script>
function geoFindMe() {
var output = document.getElementById("out");
if (!navigator.geolocation){
output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
return;
}
function success(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
document.getElementById('page:form:lati').value = latitude ;
document.getElementById('page:form:long').value = longitude ;
};
function error() {
output.innerHTML = "Unable to retrieve your location";
};
navigator.geolocation.getCurrentPosition(success, error);
}
</script>
<apex:form id="form">
latitude :<apex:inputField id="lati" value="{!Candidate__c.SSN__c}" />
longitude :<apex:inputField id="long" value="{!Candidate__c.Street__c}" />
</apex:form>
</apex:page>