How to get a lookup filter on a user field (that includes groups) to work properly?

edited April 15, 2019 in Questions
I am trying to add a lookup filter to an owner field (the native one). The owner field on this object supports both groups and individual users.  

Here's my configuration steps:

1. Select field to filter - shows me this pop up:
image

2. Selected "Group" and got all group fields. From this selected "Developer Name"
image

3. Finished configuration of filter:
image

When I preview the page, the filter works as expected on the group list and does not affect the user list:

imageimage

but at the top of the page I also get this error:
image
"1. A Skuid Model, '_TempModel_1475080514836', has a Condition on a Field with relationship name 'DeveloperName', on the User Object, but this Field appears to be invalid. Please check that this Field actually exists on this Object, (or on related Objects), and if it does not, change any Conditions on this Model that reference this Field."

What am I doing wrong here?

Comments

  • edited November 18, 2016
    Hi Susan--Have you added all the relevant fields on the model?
  • edited June 6, 2017
    The filter doesn't reference any other model - so I'm not sure what other row fields or models I would need on my model other than the owner(user) field. On the model when I drill down on the owner field there is no field with the name 'DeveloperName' like there is on the group object.

    I did solve this by overriding the metadata on the record owner field to just pull the group object (see below).  This works for my scenario, where I only want the filtered options to be groups, but this wouldn't solve the situation where there are filters for groups and users.

    image
  • edited November 18, 2016
    I'm glad you were able to figure this out using the metadata field override. I've not actually used the Group object before in Salesforce. Let me try to reproduce this and get back to you!
  • edited November 18, 2016
    Actually can you post a screenshot of your models/objects setup too?
  • edited March 26, 2019
    Anyone have a solution for this?  My use case: when assigning a case owner, it can be a user or a queue (group).  But I want my User list of options to be only internal (non community) users.  When I put a filter on the lookup field looking at UserType, it throws an error because the filter doesn't apply to the Group object.


  • edited April 8, 2019
    bumpity bump
  • John DahlbergJohn Dahlberg ✭✭✭✭
    edited April 15, 2019
    I haven't run into this issue and have the same use case.  When you setup the lookup filter, you pick the object type.  I haven't been able to find any custom logic for polymorphic lookup filters, however, so I believe you're limited to AND conditions.  Here's a screenshot on the case owner field where there are different filters for the group and the user, filtering out only active internal users:


  • edited April 9, 2019
    Not going to complain, but the red errors I previously saw are now gone when I tried again.  I'm calling it a win.  Thanks for responding!
  • edited April 15, 2019
    Hey John - the error DID come back.  My filters were on User, and I had no filters on Group.  I added a filter for group (just used Name != Null) and the error is gone.  So I guess it didn't like having one filter type but not on the other!
  • John DahlbergJohn Dahlberg ✭✭✭✭
    edited April 15, 2019
    That's interesting.  I'll have to keep that one in my back pocket.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!