You need to sign in to do that
Don't have an account?
AK_Smith
reload salesforce1 page after save
How to refresh parrent page in salesforce1 after save VF page
My code is:
My code is:
<apex:page standardController="Project__c" id="page" docType="html-5.0"> <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.toString().replace(".",",") ; document.getElementById('page:form:long').value = longitude.toString().replace(".",",") ; }; 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="{!Project__c.l__c}" /> longitude :<apex:inputField id="long" value="{!Project__c.ll__c}" /> <apex:commandButton action="{!save}" value="Save"/> </apex:form> </apex:page>
<apex:commandButton action="{!save}" value="Save" oncomplete="reload()"/>
<script>
function reload(){
sforce.one.back(true);
}
</script>
i hope it helps you.
Let me inform if it helps you
thanks
sfdcmonkey.com
All Answers
<apex:commandButton action="{!save}" value="Save" oncomplete="reload()"/>
<script>
function reload(){
sforce.one.back(true);
}
</script>
i hope it helps you.
Let me inform if it helps you
thanks
sfdcmonkey.com
Works like magic!