You need to sign in to do that
Don't have an account?
shiva 463
A problem with the OnClick JavaScript for this button or link was encountered: document.reload is not a function
Hi All,
Iam trying to referesh the page on click of button in detail page. I tried with the following script but get an popup error and iam getting the result finally but popup should be removed.So can any one help me on this issue.
Script:
{!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(document.location.reload(true),60000);
document.reload(true);
Iam trying to referesh the page on click of button in detail page. I tried with the following script but get an popup error and iam getting the result finally but popup should be removed.So can any one help me on this issue.
Script:
{!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(document.location.reload(true),60000);
document.reload(true);
Use location.reload(forceget);
forceget :
false - Default. Reloads the current page from the cache.
true - Reloads the current page from the server
Hope this helps
I tried with ur suggestion its not working.