Optimize SuiteCRM Global Search – Add Fields to Global Searches

Learn how to customize SuiteCRM Global Search to include specific fields and improve your search functionality. Follow my step-by-step guide and video tutorial for a seamless experience.

In today’s fast-paced business world, having instant access to the right information is crucial. The SuiteCRM Global Search functionality is designed to streamline your tasks but might not always include every field you need and expect. Sometimes, it’s more convenient to search directly rather than using filters. To add specific fields to the Global Search, you’ll need to modify your SuiteCRM code base slightly. Don’t worry, let’s make this easy for you!

In this tutorial, I’ll show you how to optimize SuiteCRM Global Search to suit your unique business requirements better. You’ll learn how to add custom fields to your search functionality, ensuring you can quickly and efficiently find the information you need, when you need it.

For a visual walkthrough, check out my comprehensive video tutorial on optimizing SuiteCRM Global Search. It provides step-by-step instructions and additional insights to help you master this process.

Hier klicken, um den Inhalt von www.youtube.com anzuzeigen


Why Use Global Search in SuiteCRM?

Global Search in SuiteCRM allows users to quickly find information across different modules without navigating through multiple filters. It’s particularly useful for locating specific details like city names or custom fields that might not be included in the default search settings after adding those fields. By customizing Global Search to include these fields, you can enhance efficiency, ensuring quick access to critical data and improving overall productivity.


SuiteCRM Global Search: How to Use It

First, let’s look at our data. Suppose we have over 3,000 leads and want to search for those from “Frankfurt”. When using the filter, we find 22 leads from Frankfurt. 

SuiteCRM Filter Search Leads

However, using Global Search returns zero results. This discrepancy occurs because certain fields are excluded from the Global Search preferences to keep it fast. 

SuiteCRM Global Search - Frankfurt
SuiteCRM Global Search - no results

To customize this, we need to make configuration changes to your SuiteCRM file system.


How to Customize SuiteCRM Global Search

To customize SuiteCRM Global Search, you’ll need to make some configuration changes to your file system. You can either use a file transfer tool like FileZilla to download, edit, and re-upload the necessary files, or edit them directly on the server via the command line.

How to Customize SuiteCRM Global Search

First, navigate to the SuiteCRM root folder, then change into the public directory, followed by the legacy folder, and finally the custom directory. Always make changes within the custom directory to ensure your SuiteCRM remains upgrade-safe.

Custom Directory

Within the custom directory, navigate to the modules folder. If you want to add the city field to your Global Search, you need to make changes in the Targets, Leads, Contacts, and Accounts modules. For demonstration purposes, let’s focus on the Leads module. Inside the leads folder, locate the metadata folder.

Here, find the SearchFields.php file within the module you want to modify, such as Leads. If this file doesn’t exist, copy it from the standard or core module folder, and then customize it inside your custom folder.

Open the file for editing. You’ll see fields like First Name and Last Name already set for Global Search. To add the city field, set ‘force_unifiedsearch’ to true for both Primary and Alternative Address City fields. You can do this for any field you want to include in the search.

After making these changes, save the file and return to your CRM system.

Quick Repair and Rebuild

Next, it’s important to perform a Quick Repair and Rebuild from the Admin panel.

Admin Tools - Repair
Quick Repair and Rebuild

This action refreshes the cache and synchronizes the vardefs (variable definitions inside your PHP file), and checks for table configurations or differences, ensuring your changes take effect.

Quick Repair and Rebuild processing

Once completed, you should be able to search for the fields you added, such as the City, and see the expected results.


Advantages and Disadvantages

Advantages and Disadvantages of Using This Method

Customizing your SuiteCRM system to better fit your business needs and processes is entirely possible with a few changes. However, these customizations are done directly through configuration files rather than a user interface. Building a user interface for this task takes time, which is probably why it hasn’t been implemented in the admin area.

The great advantage of this method is its compatibility with different environments such as staging, quality/testing, and live environments. When using a version control system like GitHub, you can document your changes directly. If something breaks, and you only realize it months later, you can trace back and identify the issue. Your documentation will highlight any changes that might have caused the problem, making it easier to resolve.

Although this approach requires working directly with files, it is quite helpful. Ensure you are inside the custom folder because everything you customize here and in the Admin area (via Studio) will be upgrade-safe. If you customize code outside the custom folder, it will be lost during the next upgrade. You definitely want to be able to upgrade later to keep your installation fast, secure, and possibly gain new features.

Bastian Hammer round portrait

Stay upgrade safe!
I can’t stress this enough. In order to upgrade your system, make sure that your customizations won’t get lost from one version to the next!

Bastian Hammer

Here, you will find more files that can be customized. Once copied to your custom folder, you can add code and tailor your CRM system according to your needs.


Recap

Recap: Streamlining SuiteCRM Global Search

To quickly recap, adding fields to your Global Search feature is straightforward, as you can modify the SearchFields.php file inside your modules folder. Always make sure to place these changes into the custom folder, not the core modules folder, to ensure they are upgrade-safe.

After making any changes, be sure to hit the Quick Repair and Rebuild option. This step is necessary to get everything running smoothly and to test the new functionality. If everything worked correctly, you should see the results by searching for the fields or content that you’ve just added to your Global Search feature.

If you have any questions or need further assistance, feel free to leave a comment or contact me directly. Don’t forget to check out my other videos for more tips and tutorials. Thank you very much for your time!

Scroll to Top