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
jmaskelljmaskell 

Assign To Me

Hi All,

 

Could anyone help me out, i am trying to create a button called "Assign To Me" for Cases.


So that i dont need to go into the "Edit" of a record to assign it to me.

 

This would be allot quicker.

 

Thanks in Advance

Jake Maskell 

Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf

You could use this as a base.  It's not that hard, just make the button set the OwnerId of the case to your user ID.  The button in that link does it on lists, but you can trivially modify it to work on an individual case detail record.

 

 

All Answers

MATTYBMEMATTYBME
On a Case List View you have the option of selecting one or multiple Cases and hitting the "Change Owner" button. This re-assigns those Cases you have selected to you, as long as you select yourself as the owner to re-assign to.
jmaskelljmaskell

Thanks but i need some sort of button so that when i am on a case detail view i press to assign it to me.

 

Kind Regards

 

Jake 

 

 

MATTYBMEMATTYBME

On the Case Detail page there should be a field "Case Owner." There should be a link next to it to "Change" Owner.

 

 

This affectively re-assigns the ownership to whoever is selected.

jmaskelljmaskell

I dont think you quite understand what i meen.

 

What i need is a button that i can click on to assign the case to me ( Here is a screenshot ) 

 

Thanks A lot for your help

 

Jake 

Message Edited by jmaskell on 07-15-2009 08:16 AM
MATTYBMEMATTYBME
What I am saying is you do not need a button to do this. Why spin the wheel when you can click "Change" next to the Case Owner to re-assign to you? You do not need to Edit the Case to do this.
Message Edited by MATTYBME on 07-15-2009 08:23 AM
jmaskelljmaskell

the reson for the button is to make it quicker.

 

Thanks 

werewolfwerewolf

You could use this as a base.  It's not that hard, just make the button set the OwnerId of the case to your user ID.  The button in that link does it on lists, but you can trivially modify it to work on an individual case detail record.

 

 

This was selected as the best answer
cbuhr3cbuhr3

werewolf wrote:

You could use this as a base.  It's not that hard, just make the button set the OwnerId of the case to your user ID.  The button in that link does it on lists, but you can trivially modify it to work on an individual case detail record.

 

 


Sorry to dig up an old post but I'm trying to do the exact same button as the OP but that link doesn't work. Can someone please help?

 

 I would guess that the code would look something like this but I'm afraid to try it as I don't want to mess things up:

 

{!REQUIRESCRIPT("/soap/ajax/13.0/connection.js")} var records = {!GETRECORDIDS($ObjectType.Case)}; var newRecords = []; if (records[0] == null) { alert("Please select at least one row") } else { for (var n=0; n<records.length; n++) { var c = new sforce.SObject("Case"); c.id = records[n]; c.OwnerId = User.Id; newRecords.push(c); } result = sforce.connection.update(newRecords); window.location.reload(); }