You need to sign in to do that
Don't have an account?
chopair
Window.reload()
I have a custom button that when clicked updates a field on a case but unless you refresh the screen, you don't see update on the record. Is there a way to add a reload funciton to my javascript that will refresh the page for me? I am new to coding so any help would be greatfully appreciated.
My current code:
{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}
var c = new sforce.SObject("Case");
c.Id = "{!Case.Id}";
c.JITB_Notify_Now__c = "1";
window.alert("Case has been transferred to JITB")
var result = sforce.connection.update([c]);
My current code:
{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}
var c = new sforce.SObject("Case");
c.Id = "{!Case.Id}";
c.JITB_Notify_Now__c = "1";
window.alert("Case has been transferred to JITB")
var result = sforce.connection.update([c]);
Code: Unless they're using some weird obsolete browser or have their browser set to never reload pages, this will reload the page using the new information.
~ sfdcfox ~
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">