I have a lookup field which shows a lookup for 4 entities. So, I have added the PreSearch Filter to filter only the contacts when I click on the field. But, when I click on Look for more Records, I want the search to be made only on Contacts entity.
I want to see only Contacts entity on the following image :
Is it possible?
It’s not possible to hide those related entities from the list. But we can disallow the users to choose any other unwanted entity records in that lookup.
We have to use
addPreSearch
andaddCustomFilter
. For example, to allow users to choose only contact but not account or systemuser, see the following snippet. This will filter out account & systemuser records from the view & users can move forward only by choosing contact.Read more
Edit:
Adding another undocumented (hence unsupported) till 8.x
9.x documented & supported way:
Read more