ANS-0194 · SAVED SEARCHES & FORMULAS
How to Use @NONE@, @CURRENT@, and @HIERARCHY@ for NetSuite Search Filters
This article explains how to use special filtering values in NetSuite saved searches and SuiteScript to refine results based on assignment or team hierarchy.
Short answer
The special filtering values @NONE@, @CURRENT@, and @HIERARCHY@ allow users to dynamically filter NetSuite search results. @NONE@ identifies unassigned records, @CURRENT@ filters for records assigned to the current user, and @HIERARCHY@ retrieves records associated with the user's defined team, applicable in both saved searches and SuiteScript.
Scenario
Users often need to create dynamic search filters in NetSuite that adapt based on record assignment, the current user, or team hierarchy. Standard filtering options may not always provide the flexibility required to achieve these specific criteria, leading to challenges in retrieving precise datasets for reporting or operational purposes.
Solution
NetSuite provides special filtering values that allow for dynamic and context-aware search results in both saved searches and SuiteScript. These values are particularly useful for filtering records based on assignment or team structure.
- @NONE@: This value equates to "anyof" or "unassigned," depending on the specific field being filtered. It is used to identify records where a particular field has no assigned value.
- @CURRENT@: When used in saved searches, @CURRENT@ equates to "Mine." This filter is effective for retrieving records associated with the currently logged-in user. For instance, it can be used to return all events organized by the user.
- @HIERARCHY@: This value equates to "MyTeam." It is typically applied to fields like salesRep on Customer records. If the members of a sales team have been previously defined, using the @HIERARCHY@ filter will return only the customers associated with members of that sales team.
search.createFilter method from SuiteScript 2.x should be used.filters.push(search.createFilter({name: 'organizer', operator: 'anyof', values: '@HIERARCHY@'}));This example demonstrates how to filter records where the 'organizer' field is associated with the user's defined team hierarchy.
Expert NetSuite Support
Need help with this NetSuite issue?
Saved Searches & Formulas consulting and configuration support
