ANS-0085 · SAVED SEARCHES & FORMULAS

How to Filter NetSuite Saved Search Results by Logged-In Partner User

This guide addresses a common issue where the {me} keyword in NetSuite saved search formulas fails to correctly identify the current partner center user, providing a robust solution.

Short answer

To correctly filter NetSuite saved search results for the logged-in Partner Center user, embed the DECODE formula within a CASE WHEN statement. This ensures the {me} keyword is evaluated as a formula/field rather than a literal string, allowing dynamic filtering based on the current user's partner record.

Scenario

When attempting to create a NetSuite saved search that dynamically filters results based on the currently logged-in Partner Center user, administrators may encounter an issue. The {me} keyword, when used directly within a formula text criterion, is often interpreted as a literal string rather than a dynamic reference to the current user's record, leading to incorrect or no results.

Solution

To resolve this, the DECODE formula must be enclosed within a CASE WHEN statement, specifically testing for a match with the {me} keyword. This approach forces NetSuite to correctly evaluate {me} as a dynamic field reference, allowing the search to filter results based on the logged-in Partner Center user. The correct formula to use in the saved search criteria is:

CASE WHEN DECODE({partnerteammember},{custbody_sales_team_rep_1.custentity_partnerrecord},{custbody_sales_team_rep_1.custentity_sf_supervisor_partner.id},{custbody_sales_team_rep_2.custentity_partnerrecord}){me} THEN '1' ELSE '0' END *is* 1

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant