Performing a Salesforce global search on lookups tends to yield you no results. Read on for a some tips on how you can accomplish this.
Why Does A Salesforce Global Search on Lookups Not Work?
If you are a user of parent account field in Salesforce you may have noticed you cannot search it at all. For instance, if if you wanted to search on parent company “ABC Company” and have all the child accounts come up in the global search when you search for “ABC”, you will have an issue since lookup fields are not available for global search in Salesforce.
Luckily, with some customizations you can accomplish this type of search.
How Do I Create A Searchable Lookup Field?
We can still accomplish this but it requires creating a searchable field, setting up an automated process to populate the field and then another process to manually update the field. We will use the above example to outline the process.
Part 1 – Create the fields
- Go to Setup, Object Manager and Choose Accounts.
- Choose Field and Relationships on the left and then click New.
- Choose the Text field and click next. Name the field “Parent Account (for search) and click Save. Choose the visibility and layouts accordingly.
- Repeat step 3 and create a checkbox field called “Update Parent Search”
- If the fields do not appear in the account layout you can add them wherever you would like.
Part 2 – Create the processes – here is created using Process Builder but you can use Flow Builder as well.
- Go to Setup and type “process” and select 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 and created and click save
- Next screen, add your criteria. Name the criteria (for reference), then make the changes. Here I’m comparing the parent account id (the actual data pulled back from the lookup) and making sure it isn’t null and it’s changed (be careful of the true/false on the right) and click save.
- Now create the immediate actions. Click on that, then name it, choose the “update records” function, select the current record, then update the field you want with a formula.
- Activate the process.
The above is now good for all new and changed records. A second process now needs to be created for the older accounts that will not be changed. This process will involve the checkbox field created above.
Go through the same process as above with the new process, name it, etc.
Once the checkbox process is in place, you can create a view where the parent account search is empty and the parent account is NOT. It will make sense to add in the checkbox field as a column.
Once this view is active, you can actually update or check that box from the view (multiple records), which will force the update of the field. Once their all done, remove the check box field, remove the views.
Please contact us at info@marksgroup.net for any Salesforce questions or support you need. Feel free to comment below. We’d love to hear your thoughts!
hii awesome post, thank you.
Avast Helpline Phone Number
The best outstanding information you share for handling the accounts online by using different cloud accounting software to run a successful business by managing the accounts of employee .if you want to run a business successfully then you must read this kind of information which provide you the best tips for managing the business accounts of your business employees and also remember all the important taglines of this kind of information especially “customer service management ” .
Thanks
Thank you so much for the awesome post about Lookups in salesforce. I am sharing with you an articles which is about slaesforce form building without any coding knowledge. I think people will enjoy this. https://salesforce.formtitan.com/formbuilder-integration
Thanks Again
Thank you useful,
From the above I understood that I have to create 2 process builders.
When I start creating the second one (the one for the checkbox) I don’t quite understand the following:
“ Change on the checkbox though will force it to work no matter if it changes or not and will just overwrite (this is for the older stuff) “ ?
So it’s been a while since I’ve written this one, but if memory serves, what I did was create a checkbox that allows you to do a mass update from a view. The process (the 2nd one) works off the change of the checkbox to TRUE or FALSE depending on what’s preferred and default. Create the checkbox, create a process that looks for a change in the checkbox, then add the checkbox to the view “where parent account is blank” – mass update the checkbox, that will update all the accounts created before today. Hope this helps!
Thanks for sharing this valuable information with us.