3

how to check whether a case owner is a queue or a user? I am writing a validation rule where i need to check who is the owner of the case.

2 Answers 2

12

You can check if any of the User- or Queue-specific polymorphic Owner fields is empty. e.g.

ISBLANK(Owner:Queue.Id)

will be true if the owner is a User and false if the owner is a Queue

The opposite would be:

ISBLANK(Owner:User.Id)

More info about polymorphic fields here: https://developer.salesforce.com/blogs/developer-relations/2013/06/cross-object-owner-fields-a-powerful-new-formula-option.html

9

A tip to @guy as I didn't know about the polymorphic formulas (sheesh)

Another solution is

LEFT(OwnerId,3) = '00G'  /* this is a queue, all Queue Sobject ids start with 00G */ 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .