• Ana
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

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:

 

{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}

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

caseObj.Updated__c = ' ';

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

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!

  • August 15, 2012
  • Like
  • 0