• Custom Sales
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to build a button in the list view to:
Change case ownership to the current user
Change the case status to work in progress

I have the following code in the detail page that works fine:

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

var caseObj = new sforce.SObject("Case");

caseObj.Id = '{!Case.Id}';

caseObj.OwnerId = '{!$User.Id}';

caseObj.Status = "Work In Progress";

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

window.location.href=window.location.href;

but when I put the button in the list view and click on the button, nothing happens.
it is configured to execute java script as behavior and contentsouce is set to on clickjavascript

Could you guys please provide me some light?
I am trying to build a button in the list view to:
Change case ownership to the current user
Change the case status to work in progress

I have the following code in the detail page that works fine:

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

var caseObj = new sforce.SObject("Case");

caseObj.Id = '{!Case.Id}';

caseObj.OwnerId = '{!$User.Id}';

caseObj.Status = "Work In Progress";

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

window.location.href=window.location.href;

but when I put the button in the list view and click on the button, nothing happens.
it is configured to execute java script as behavior and contentsouce is set to on clickjavascript

Could you guys please provide me some light?