It's a two step process:
Group g1 = new Group(Name='group name', type='Queue');
insert g1;
QueuesObject q1 = new QueueSObject(QueueID = g1.id, SobjectType = 'Lead');
insert q1;
Group g1 = new Group(Name='group name', type='Queue');
insert g1;
QueuesObject q1 = new QueueSObject(QueueID = g1.id, SobjectType = 'Lead');
insert q1;
No comments:
Post a Comment