Ask Search:
Jacek DarlinskiJacek Darlinski 

Automatically assign case from queue to user?

My current assignement rules assign cases to specific queues based on the record type of the case. Is there a way to automatically assign the case to the user who picks up the case and reads it?

Thanks!
Marco (werewolf) CasalainaMarco (werewolf) Casalaina
There are a few ways.  You could embed a Visualforce page onto the case page which assigns the case to the current user if it's owned by a queue.  Or you could make a Get Next button, which basically will just give the user the next case that's in his queue.
Jacek DarlinskiJacek Darlinski
Hi,

Thanks for replying and sorry for getting back so late.

Can you point me in a direction in terms of creating a visualforce page that assigns the case? How would the code look like?

Thanks!
Marco (werewolf) CasalainaMarco (werewolf) Casalaina
The Visualforce page itself would show nothing; it would be small and blank, but would be embedded on the Case page.  Behind it would be an Apex controller which would assign the page to the viewing user if the case is currently assigned to a queue.  The Apex code is actually very similar to the code in that Get Next button I mentioned, just that you'd need to use it inside a controller instead of as a web service as I did in the Get Next button.

For some general samples of Visualforce code in a Service Cloud context see this page.
Marco (werewolf) CasalainaMarco (werewolf) Casalaina
Generally though I would suggest that the Get Next button may be a better solution as a user has to take definitive action to own a new case (rather than just randomly looking at one).