You need to sign in to do that
Don't have an account?
paul-lmi
how to determine if a case is queue owned
I'm working on a replacement for a home page dashboard that does not require a refresh every time one of our managers wants a picture of open cases in our org. One of the issues I always hit, with Apex, and also with validation, workflow rules, etc, is properly detecting if a case is queue owned. Is there a way to globally determine if a case is queue owned without having to rely on a formula that you need to update for every time a queue is added to the org?
Not "Owner Type", "Owner.Type".
e.g. -
The debug would show "Queue".
All Answers
You can pull Owner.Type when querying the Cases table. Then you just need to check to see if it is "Queue" or "User".
what field is "Owner Type"? i don't see this in the schema editor.
Not "Owner Type", "Owner.Type".
e.g. -
The debug would show "Queue".
two funny things came out of this little project
1. your solution worked like a charm.
2. salesforce dev support contacted my boss (org contact) about the queries I was using, because SF's SOQL couldn't optimize them, which meant we were being resource greedy (my words). your code fixed that. so they can optimize on (column = 'string', but not "column = NULL".
thanks much