You need to sign in to do that
Don't have an account?

Change Case Owner to a Queue from within Apex Trigger
I have a before insert trigger on the Case object. Under certain conditions, I need to change the owner of the case to a Queue called 'Platinum'. I need to set x.Owner = <Platinum Queue>. I assume i have to run a sql statement to get the ID of the 'Platinum' queue and then set x.owner equal to that? thanks
Run a SOQL query on the QueueSObject and fetch the id of the Queue by searching on the basis of the name of the Queue. Set ownerid = queue.id; and this should work
Regards
Sam
All Answers
Run a SOQL query on the QueueSObject and fetch the id of the Queue by searching on the basis of the name of the Queue. Set ownerid = queue.id; and this should work
Regards
Sam
worked. thx!