function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion


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:

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]);
I always add the following line of code to refresh the page:

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 ~
This worked great, thank you.
I had this problem with an safe setting in Internet Explorer. To avoid this little problem, without page refreshing I wrote these lines after my <title></title> tags in the S-Control: