I want to create a queue first. then i have to assign the case owner to that particular queue. How to accomplish this ?
I am trying to create a queue using Apex
Group testGroup = new Group(Name='testgroup', Type='Queue');
insert testGroup;
QueuesObject testQueue = new QueueSObject(QueueID = testGroup.id, SObjectType = 'Case');
insert testQueue;
I am getting the error as
DML operation INSERT not allowed on Group
Provide me a solution please..
Thanks in advance