I have a lookup filter which I want to bypass as a system administrator when doing i.e. data imports.

I found possible solutions but they dont seem to be working.

  1. Added a second filter condition OR profile equal to system administrator
  2. Created a custom checkbox field on the user object and set this to true for the system administrator and added a second filter AND $User.bypassFilter__c = false

None of these seem to be working even if I try to update the record directly am I missing something?

Criteria 1: Object: Record Type equal to Sold

Criteria 2:

Variant 1: profile equal to system administrator. Logic 1 OR 2

Variant 2: $User.bypassFilter__c = false. Logic 1 AND 2

Here system admin has bypassFilter__c set to true

The filter is throwing an error that the recordtype isn't correct

  • 1
    Welcome to SFSE! Please take a moment to read How to Ask and take the tour. Including a Minimal, Complete and Reproducible Example would be helpful. Your verbal description is somewhat minimal, not complete and not reproducible.
    – identigral
    Aug 25 at 15:40
  • I think it'll help if you separate the criteria and the filter logic. I.e. tell us that "criteria #1 is X, criteria #2 is Y", and "My filter logic is (1 OR 2)". You should also expand on what "not working" means. Are you getting an error? Is there no error but you're not seeing the records you're expecting?
    – Derek F
    Aug 25 at 15:43
  • @DerekF I updated my question
    – Thomas
    Aug 25 at 15:58

2 Answers 2


I found that adding another criteria to the filter does not work. An option that I found which could change in the future is that setting the lookup filter to optional gives a system administrator the option to bypass the filter. Since the option to remove the filter as a user currently is not possible in lightning (what is currently in use) this was a feasible solution for now, since the task was not to spend any time on fixing the data. This solution will work and buys my client time to fix the data in the future.


Can you try as below.

first you add actual filter, then add user profile and name is not blank. finally add custom logic filter ((actual filter) OR (admin filter))

enter image description here

  • 1
    While similar, this doesn't match what OP is trying to do here. It also contains redundancy (why have a separate criteria for not system admin when you can simply do NOT(2)?) This is also definitely one of the things that you should try to reproduce in your own org and then test your solution before writing an answer to make sure it works.
    – Derek F
    Aug 25 at 16:26
  • @DerekF Do you have a solution for this?
    – Thomas
    Aug 31 at 9:02

You must log in to answer this question.

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