Published on July 1, 2023.
A common request that I get from my NetSuite clients is to customize the Global Search feature. While it is possible to do things such as include custom fields in the search results and use SuiteScript to filter the results, the level of customization that my clients usually ask for simply isn't possible.
In the past, when a client would make this type of request, I'd develop a custom Suitelet to address their specific requirements. The External ID Search Utility, which I shared back in August of 2022, is based on one of those requests.
However, a client recently asked for a much more powerful and flexible search utility. They wanted to be able to search across multiple record types and a wide range of fields. The end result was essentially an alternative to the native Global Search function, and fully customized to their needs.
Today I'm sharing a somewhat generic version of that solution, and I'm calling it "Power Search." With it, you can enter keywords, and records that reference them will be displayed in a unified table. In this instance of the script, the record types that are supported include entities of all types (Customers, Vendors, Employees, etc), items of all types, transactions (Item Fulfillments, Sales Orders, and Purchase Orders). It also supports searching for packages based on tracking numbers, and files in the File Cabinet.
Here's a short animation showing Power Search in action.
Click the image to view a larger version.
If you've been following my blog, then it's probably no surprise that the script makes use of SuiteQL. A single query is used, which contains several subqueries whose results are combined using the UNION ALL operator.
The results are displayed in an HTML table, and I'm using the DataTables jQuery Javascript library to enhance the table, including paginating the results and giving the user the ability to filter the results, sort them, and so on.
The script is capable of retrieving and displaying up to 5,000 results.
I'm making the Power Search Suitelet available free of charge under an MIT license.
You can download the script here: https://tdietrich-opensource.s3.amazonaws.com/suitescripts/power-search.suitelet.js.v20230701.zip
NetSuite developers who have SuiteQL experience can customize Power Search to meet the specific needs of their users. For example, they might want to modify the standard query so that it supports additional records types (including additional transaction types and even custom records), searches across additional fields (including custom fields), and displays the results with alternative columns.
As always, I hope you find the code that I've shared to be helpful.
Hello, I'm Tim Dietrich. I develop custom software for businesses that are running on NetSuite, including mobile apps, Web portals, Web APIs, and more.
I'm the developer of several popular NetSuite open source solutions, including the SuiteQL Query Tool, SuiteAPI, and more.
I founded SuiteStep, a NetSuite development studio, to provide custom software and AI solutions - and continue pushing the boundaries of what's possible on the NetSuite platform.
Copyright © 2025 Tim Dietrich.