You need to sign in to do that
Don't have an account?
ram_dev
need to assigned case to perticuler queue.
Hi,
I've trigger for generating case whenever some fields are updated on perticuler object. The generated case must be assigned to perticuler queue(queue1). i wrote soql query for this. its got worked perfectly when that case contains only one queue. now we have multiple queues(queue2, queue3..etc). now it is not working. what changes i need to do in my trigger code. the below is the query i used earlier:
list<QueueSobject> q = [select Id, QueueId from QueueSobject WHERE SobjectType = 'Case'];
How about adding some extra filters to your SOQL ?
Something like Queue Name?
Check the above SOQL it has a added filter for QUEUE name.
All Answers
How about adding some extra filters to your SOQL ?
Something like Queue Name?
Check the above SOQL it has a added filter for QUEUE name.
Hi,
Thankyou. I already applied this. AM getting error list index out of bounds. Am assigning it like,
vCase.q= vlstQ[0].QueueId;
what i need to change. can you suggest me
This means there are no matching queues to that criteria that you added. You have check whether the query returned records before using the value by doing
Hi,
Thankyou very much for your quick reply. Case generated but case owner is coming like my name. not the Queue name. wt do?
(queue contains Different users. so we need to get the queue name there like my case generation).
As I said "This means there are no matching queues".
Try runing the query in developer console and check if any result is returned. I am pretty much sure its not returning any value.
Please make adjustment accordingly to the SOQL so that it returns the desired QUEUE.
hi,
Thankyou very much for your help
you are correct. I tried below soql query in developer console . it is getting the error like "Unknown parcing error."
Below is the my query:
list<QueueSobject> q = [select Id, QueueId from QueueSobject WHERE SobjectType = 'Case' AND Queue.Name = 'queue1'];
queue1 is ther in queues. but why it is not considering.
man the query editor just takes the query. That is
select Id, QueueId from QueueSobject WHERE SobjectType = 'Case' AND Queue.Name = 'queue1'
Please double check if the queue is supported for Case, and please double check the Queue Name.
Thankyou. Its worked..