You need to sign in to do that
Don't have an account?
RaviKumar
Get Queue name/Id where i picked the Case
Below Scenario:
Step1. I have created a case and assigned it to a Queue(For Ex:Q1)
Step2. One of the users(Usr1) belongs to that Queue (Q1) accepted the case
Step3. Usr1 becomes the owner of that Case
Step4. Now User(Usr1) want to send back case to the same Queue-Q1
How to find the Queue Name/Id where the users picks the Case?
How can we find it?
Any direct solution or Alternate?
Howwww?
Step1. I have created a case and assigned it to a Queue(For Ex:Q1)
Step2. One of the users(Usr1) belongs to that Queue (Q1) accepted the case
Step3. Usr1 becomes the owner of that Case
Step4. Now User(Usr1) want to send back case to the same Queue-Q1
How to find the Queue Name/Id where the users picks the Case?
How can we find it?
Any direct solution or Alternate?
Howwww?
1) Create a text field named Original Queue Name
2) Create a process builder which would populate value in this "Original Queue Name" whenever case moves from Queue: Q1
(Also have a condition in process builder which would say once the "Original Queue Name" is populated, don't run it again)
3) Now, whenever your user wants to change the case back to the Queue, hs/she can refer the name from "Original Queue Name" field.
Hope this helps!
<pre>
trigger CaseOriginalQueue on Case ( before insert, before update )
{
for ( Case newCase : Trigger.new )
{
Case oldCase = Trigger.isUpdate ? Trigger.oldMap.get( newCase.Id ) : null;
if ( (oldCase == null || oldCase.Owner != newCase.Owner)
&& String.valueOf( newCase.Owner ).startsWith( '00G' )
)
{
newCase.Original_Queue__c = newCase.Owner;
}
}
}
</pre>