You need to sign in to do that
Don't have an account?
shiva 463
How to refresh the page on click of a custom button in Edit page.
Hi All,
Can anyone help me in building the JavaScript for refresh the page on click of Custom button in Edit page.
I have oppurtunity page in this I have craeted a new record and saved it and after the save, the page will goes to edit page.In the edit page I have Custom button to claculate the amount from 3rdparty application and I am getting the reference Id from 3rd party application on refresh of browser or click of browser.But my requirement is not to refresh the page by myself it has to automatically refresh the page and get the Refrence ID from 3rd party application.
Intially I have achieved like this using Java script but the page is not refreshing or reloading,So can anyone help me on this issue.
Code:{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
var myJob = new sforce.SObject("Opportunity");
myJob.Id = "{!Opportunity.Id}";
myJob.check__c= "true";
var result = sforce.connection.update([myJob]);
setTimeout(window.location.reload(true),60000);
window.location.reload(true);
Here is the EDIT page what iam trying to achieve
Can anyone help me in building the JavaScript for refresh the page on click of Custom button in Edit page.
I have oppurtunity page in this I have craeted a new record and saved it and after the save, the page will goes to edit page.In the edit page I have Custom button to claculate the amount from 3rdparty application and I am getting the reference Id from 3rd party application on refresh of browser or click of browser.But my requirement is not to refresh the page by myself it has to automatically refresh the page and get the Refrence ID from 3rd party application.
Intially I have achieved like this using Java script but the page is not refreshing or reloading,So can anyone help me on this issue.
Code:{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}
var myJob = new sforce.SObject("Opportunity");
myJob.Id = "{!Opportunity.Id}";
myJob.check__c= "true";
var result = sforce.connection.update([myJob]);
setTimeout(window.location.reload(true),60000);
window.location.reload(true);
Here is the EDIT page what iam trying to achieve
use location.reload();
Regards,
Harish.R
Not working..
Thanks!!
Sarvesh Kumar 33 this has worked :)