On the Account Object is a custom field (Picklist) called Account_Status__c with values Active and Inactive

For Certain users, I want to restrict the Inactive Accounts from showing up in the global search

What I tried so far

  • Learnt that it not possible to filter the records returned in Global Search by Picklist
  • Created a list View with filter Account_Status__c = Active. However, When you search a list view, only the first 2,000 records in the list are searched.
  • Create OWD/Sharing rules

Is Create OWD/Sharing rules the only option?

1 Answer 1


Lightning Global Search isn't going to be customizable to your needs. Your exact request is actually an idea you can upvote: Global Search filters per object. It's 10 years old so I wouldn't hold off hope for it, but in recent trends there does seem to be some customization opening up with regards to Global Search as Winter '22 has two beta features:

  1. Give admins the ability to control which objects users see.
  2. Scoping Rules

Reduce noise and unnecessary searches while enhancing your users’ productivity. Based on criteria that you select, you can set rules to help your users see only records that are relevant to them. By adding a scoping rule, you can help users focus on pertinent records and prevent them from accessing records containing sensitive or inessential information. There's potential with the above beta that you could remove accounts for certain profiles and have them interact with a LWC/custom component that applies your filter behind the scenes. I'd advise against that as the global search is everywhere and it's better to hide the records from them across the platform versus only in one specific area/feature if that's your concern.

Scoping rules, in particular, could meet your use case.

In the end, however, you answered your question yourself - If a certain group isn't supposed to see specific records, the tool at your disposal is OWD/Sharing rules which will play well across the platform unless either of the betas above become GA and meet your need.

You must log in to answer this question.

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