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


Hi, I've been sporadically receiving an issue when an OnClick button:


"A problem with the OnClick JavaScript for this button or link was encountered:

{faultcode:'sf:INVALID_SESSION_ID' ...


The code is pretty straightforward, it just updates a sigble field in the Case object when clicked:



var caseObj = new sforce.SObject("Case");
caseObj.Id = '{!Case.Id}';

caseObj.Updated__c = ' ';

var result = sforce.connection.update([caseObj]);

Behavior:  Execute JavaScript

Display Type:  Detail Case Button


As said, it's sporadic.  Usually the button works fine.  To me it sounds like a timeout on the session, when a user has the case tab open for a while.  I'm sure it could be fixed by refreshing the screen and re-clicking on the button, but I'd prefer a more elegant solution.


Any experience with this, insights, thoughts greatly appreciated!


I am having this same issue, were you able to resolve this?