Currently, lookup fields are not part of the standard indexing for custom objects, so they are not a searchable field (See here a list of all field types for each object that are searchable).
As a workaround we will create some fields and auto-populate them with a process builder when the record is saved.
So here’s the challenge… if I had an organisation “Health Organisation” and I wanted to have all the child accounts come up in the global search when I search for “Health”, I have an issue as lookup fields are not available for global search. So what I’ll do is create a searchable field, use the process builder to populate that field, then use another process to manually update that field.
1.Create 2 custom fields:
- Organisation Name (For Search) – Text field
- Update Organisation Search – Checkbox (I will explain later why we are creating this field)
2. Create the 1st Process Builder
We’re going to go to Setup, search for “Process”, then click on the Process Builder. This will open up the process builder where we want to make a new process. Let’s call it “Update Parent Search Field”. Start the process when the record changes.
Click “Add Object” to choose the object (account), when the record is edited or created.
Add your criteria and name it. Make sure the Organisation Name isn’t Null and it’s changed.
Create your immediate actions and activate your the process
Now what we did was to to create a process for new and changed records. However, we do have old records as well and here is where the checkbox we created comes to the game.
3. Create the 2nd Process Builder
Create a new Process builder and add the criteria.
Select the Action
Activate it and now you can update your old records.
Create your list view where the Organisation Name is “not equal to” blank and your Organisation Name (For Search) is equal to blank. Add the “Search” field to your list view and the user can actually update or check that box from the view which will force to update the field.