ANS-0220 · SUITESCRIPT DEVELOPMENT

How to Access NetSuite Saved Search Results with Stable URLs

Learn how to construct a persistent URL for NetSuite saved searches to prevent the common 'search criteria expired' error.

Short answer

To avoid 'search criteria expired' messages for NetSuite saved searches, use the stable URL generated when directly running a saved search, rather than a temporary URL from the 'Preview' button. This stable URL, containing 'searchid', ensures persistent access to results. While 'nlapiResolveURL' (SuiteScript 1.0) is superseded, direct URLs remain effective.

Scenario

Users attempting to access NetSuite saved search results via a URL may encounter an 'Your search criteria expired' message after approximately 15 minutes of inactivity. This issue commonly arises when the URL used was generated from modifying search criteria and then clicking the 'Preview' button, leading to a temporary search session.

Solution

To ensure persistent access to NetSuite saved search results and prevent the 'Your search criteria expired' message, it is crucial to use a stable URL directly associated with the saved search, rather than a temporary URL generated during a preview action.

  1. Avoid using URLs obtained after modifying search criteria and clicking the 'Preview' button. These URLs often contain temporary parameters and lead to expiration, as seen in this example:

https://system.netsuite.com/app/common/search/searchresults.nl?rectype9&searchtypeCustom&sortcolÏRECORD_43_raw&sortdirASC&csvHTML&OfficeXMLF&pdf&styleNORMAL&report&grid&dleT

Attempting to access a search with such a URL typically results in the message: "Your search criteria expired. The criteria for a given search generally expire after 15 minutes of inactivity. Please return to the search definition page and re-submit your search."

  1. Instead, utilize the stable URL generated when directly running the saved search from the global search or its saved search list. This URL includes a 'searchid' parameter, ensuring the criteria are permanently linked and do not expire. An example of a stable URL is:

https://system.netsuite.com/app/common/search/searchresults.nl?searchid6&whence

This method ensures that the search results remain accessible without encountering the expiration error, providing a reliable link for consistent data access.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant