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

One Click Case Reassign

Is it possible to create a custom link tied to an SControl that will reassign the current case to a specified (in code) (OwnerId) user?
I would possibly like to update the current case status as well.  Does anyone have an example of this?  I am decent with the API in .NET but trying to get this to work is proving more difficult than I would have thought.  Thanks in advance.

Yes, this is possible and we have created similar s-controls for our clients.  It sounds like you want to always reassign to the same user, so this should be a fairly straightforward update of the ownerId on the case.  Here's a sample of an update to a case

  var case = new sforce.SObject("Case");
  case.set ("Id",'{!Case.Id}');
  case.set ("OwnerId", 'INSERT ID HERE');
  result = sforce.connection.update([case]);


Thank you Matt.  Turns out I was close, just had some syntax problems.  Thanks again!
If anyone has Professional Edition they can do the same thing using a custom link like the one below.  Just replace the ID with the ID of the user they want to assign it to.