function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Baylor Peak 2Baylor Peak 2 

Custom field on Case Object to display Queue name?

Hello all,

I've created a custom field called "Case_Queue__c" on the Case object. I want the field to display the name of the Queue the case is currently assigned to.

I thought I could use a formula on text field but it's not working:

IF( Owner:Queue.Id <> null, Owner:Queue.QueueName, "No Value" )

What am I missing, please?

Thank you,
B

Raquib SFRaquib SF
Hi Baylor,
 
Did you try creating a formula field of type text? 
I think that should do the trick.

Thanks!
Andrew GAndrew G
IF( LEFT( OwnerId ,3) = "00G", Owner:Queue.Name, "Not Queue")


Remember the OwnerId field can contain either a User or a Queue.  So we test for the prefix for Queues (00G), and if it is a Queue, drive to the Queue name via the lookup field.

Regards
Andrew
 
Baylor Peak 2Baylor Peak 2
Thank y'all both:) I feel like a good overlooking the Formula field...that's exactly what I was looking for:) Regarding returning queue or user name, that shouldn't be an issue because cases are always created via Email-to-Case and routed to a specific queue and not a user. So I am using: IF( Owner:Queue.Id