+ Start a Discussion
VIGNESH SETHURAMALINGAM 7VIGNESH SETHURAMALINGAM 7 

sforce.one.navigateToSObject not refreshing page

Hi All,

I am using sforce.one.navigateToSObject method in one of my edit page. I am calling an javascript method from my custom button which inturns calls  this method and redirecting to an record.
i am editing the record in my VF page  and redirecting to its detail page with sforce.one.navigateToSObject method.
This method redirects  but does not refreshes the page with my updated value.

i have used Sfdc.canvas.publisher.publish({name: "publisher.close", payload:{refresh:"true"}}); also which did not help me.

please help me

Thanks in advance

 
VIGNESH SETHURAMALINGAM 7VIGNESH SETHURAMALINGAM 7
I tried the same. but it was not working to me.

In my case i 'm using an custom detail page button in an object to redirect to an VF page where the record is edited  and on click of save button i am calling an javascript method which saves the object(updated the record by an action function) and tries to redirect to the detail page by using sforce.one.navigateToSObject method.
This method redirects but not refreshes the record with updated values.
I have added my code below in an short manner. Please find and let me know for any issues.

<apex:page id="page" standardController="Opportunity" extensions="OpportunitySaveController">
<script>
 function saveOffering(){
      saveOppJs();  
  }

function onComleteAffterSave(){
sforce.one.navigateToSObject("{!$CurrentPage.parameters.ltmId}","detail");
}
</script>
<apex:form>
<apex:actionFunction id="saveProduct" name="saveOppJs" action="{!saveProduct}"                                                               oncomplete="onComleteAffterSave();" rerender="saveProductPanel"/> 
<apex:inputfield value="{!Opportunity.name}" />
<a href="javascript:void(0);" onclick="saveOpp();" >Save</a>
</apex:form>
</apex:page>

------------------------

apex class
=========

public void saveProduct(){
update Opportunity;
}


Please help me .


 
Anindya Halder 6Anindya Halder 6
any solution to this ?
I am facing the same issue
Prabhjot Singh 27Prabhjot Singh 27
sforce.one.back(true); 
This worked for me as passing true will refresh the record .