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
Vicky Fathers 9Vicky Fathers 9 

Case Assignment based on Lookup field

Hi
When a case is created, we'd like it assigned to a Queue, depending on the Service Provider chosen (custom field Service_Provider__c).
This is a lookup to Account.

Step 2 in the asignment is, formula evaluates to True...
Service_Provider__r.Id  = "0010Y000005FNcxQAG"

(the ID for this service is 0010Y000005FNcxQAG)

Step 3 - I specify the Queue.

It doesn't work - what am I doing wrong please?
I am a newish admin, rather than a developer... 
 
Leonard Silon 11Leonard Silon 11
This may be dumb but on the page layout and layout properties do you have the case assignment checkbox of Deafult checked? If not, try that and see if it works
Vicky Fathers 9Vicky Fathers 9
Hi Leonard
Not dumb at all - it took me a while to find that checkbox! (I'm new to cases), and it also took me a while to find Support Settings. I think there's something wrong with me formula - does it look ok to you?
Thanks
Vicky
Leonard Silon 11Leonard Silon 11
looks good to me but SFDC is weird at times. If that formula does not work then two other things to try is either use the service provider name or use a work flow rule. That would work as well to assign the owner. but keep trying on th case assignment
Vicky Fathers 9Vicky Fathers 9
Thanks again Leonard

If I was using Service provider name, should the formula evaluates to true part simply be
Service_Provider__c = "Raleigh House"
(if, for example, the info in the Lookup field is Raleigh House), or do I need to use TEXT or something else to get the formula to work (it doesn't work yet).
(I need a course on formulas!)

Vicky
Leonard Silon 11Leonard Silon 11
No need for TEXT unless it is a pick list. You said it was a lookup field. I do mine based on who created the case based on profile. So are you saying this is not working as you have written it ?
Vicky Fathers 9Vicky Fathers 9
HI, nope, I can't make it work with either 

Service_Provider__c = "Raleigh House"
or
Service_Provider__r.Id  = "0010Y000005FNcxQAG"

I did add a test Assignment rule, just to check I could make anything work, saying if owner is me, then assign to QueueX, and that worked.
So it's something to do with my formula I think. 
narsavagepnarsavagep

I'm sure you probably got your answer already (found this while searching for something else), but...

Service_Provider__c would contain the ID value... so you should use:

Service_Provider__c = 0010Y000005FNcxQAG

or

Service_Provider__r.Name = 'Raleigh House'

(Note, you can't always use the reference field values, it depends on when/where you are placing that reference formula.)