Welcome back to SuiteTip, your ultimate guide to mastering NetSuite's capabilities! In this edition, we'll focus on a handy workaround that allows you to inactivate multiple searches in one go.
The Challenge: Managing an Overabundance of Saved Searches
Imagine your NetSuite account is like a well-loved library, filled with resources you've curated over time. However, just like an unorganized library, having too many saved searches can make it challenging to find the ones you need. This is especially true for searches that are no longer relevant or used, creating a cluttered and disorganized workspace.
As your business evolves, so do your data analysis needs. Saved searches that were once essential might now be outdated, taking up valuable space and making it harder to navigate your NetSuite efficiently. This is a common challenge for power users who frequently create custom searches for various projects and tasks.
For other record types, you can simply run a mass update or a CSV Import to update the Inactive checkbox on the records. Unfortunately, this is not possible for Saved Searches since the ability to Mass Update Saved to inactivate/delete saved searches is still a known system limitation logged under the following enhancement requests:
- Enhancement # 96718: Lists > Search > Mass Update > New > have the ability to select a Saved Search to perform the Mass Update
- Enhancement # 170545: List > Mass Update > Mass Update : Provide ability to mass delete saved searches
The Workaround: A Step-by-Step Guide
- Create a new Saved Search by navigating to Lists > Search > Saved Searches > New
- Select Saved Search
- Enter a Search Title
- Mark the Available as List View checkbox
- Under the Criteria tab, add filters as necessary (example: Inactive - No, Last Run On before 01/01/2020, etc.)
- (optional) Under the Results tab, add or remove columns as necessary (Note: Do NOT add Inactive column in the Result)
- Click Save
- Open the List View of your Saved Searches by navigating to Lists > Search > Saved Searches
- Change the View to the Saved Search you just created
- Click the Show Inactives checkbox
- Open the Browser Console (Hit F12 then select Console)
- Copy and Paste the code:
document.querySelectorAll('[aria-label="Inactive"]').forEach((e) => {
e.click();
}); - Press Enter
You will notice that all the Inactive checkboxes on the list in the current page will be ticked. - Click Submit
- Repeat steps 12-14 until you have inactivated all the Saved Searches that matched your set criteria.
What does the code do?
document.querySelectorAll('[aria-label="Inactive"]').forEach((e) => {e.click();});
In essence, this code automates the process of clicking on all checkboxes in the Inactive column on the current page. It's a handy tool to quickly set the Saved Searches to Inactive, instead of manually clicking the checkboxes one by one.
It can save a lot of time and effort, specially if you have hundreds, or even thousands of Saved Searches you want to clean up.
Note: The number of rows in your list depends on what is set on your Home > Set Preferences > General > Optimizing NetSuite > Number of Rows in List Segments preference. Set this to a higher number if you want to lessen the frequency of repeating steps 12-14.
---
Stay tuned for our next SuiteTip, where we’ll explore more tips and best practices for navigating NetSuite Reports and Saved Searches!
We encourage you to share your own tips, ask questions, and engage with fellow community members. Your experiences can help others on their journey to becoming NetSuite analytics experts!