Rather than setting the Case.OwnerId to the Queue ID you need to set it to the Group ID. As OwnerId is a lookup to User and Group rather than User and Queue as displayed in the UI. You can check it yourself using Workbench > Info > Standard & Custom Objects > Case, Fields > OwnerId > Reference To. QUEUE Alternatively, you can use System.FlexQueue Apex methods to reorder batch jobs in the flex queue. By setting up case queues and assignment rules, cases are now automatically routed to the correct teams. 1 member • Public Group • Active 1 week, 1 day ago. Salesforce: Assign a case to a queue in Apex (Test class) Demo of how to assign a queue as a record owner in Salesforce FlowIf you're interested in learning more about flows, check out my course on Udemy. Viele übersetzte Beispielsätze mit "assign an owner" – Deutsch-Englisch Wörterbuch und Suchmaschine für Millionen von Deutsch-Übersetzungen. Search within r/salesforce. To get started, go to Setup> Administration Setup> Manage Users> Queues and click New. Queueable Apex - Example 1 Hi there, Thanks for the reply! Case Owner change from user to queue is throwing error … Queues are stored as a Group SObject: For Example: Group groupDetail = ; SpamOwnerId = groupDetail.Id; Here Type is Required and Type of the Group is One of the following values: Regular—Standard Public Group.