ANS-0192 · SAVED SEARCHES & FORMULAS

How to Create a Pop-Up Saved Search for Transaction Line Items in NetSuite

Implement dynamic pop-up links on transaction lines to display related saved search results, such as an item's purchase history.

Short answer

To create a pop-up saved search on NetSuite transaction lines, configure a public saved search, then add two custom transaction column fields: one hidden integer field to source the item's internal ID, and an inline HTML field containing a JavaScript link that calls the saved search with the item's ID as a filter.

Scenario

NetSuite users need to quickly access contextual information, like an item's purchase history, directly from a transaction line. This requires a dynamic link that opens a saved search, filtered by the specific item on the current line, without navigating away from the transaction.

Solution

To implement a pop-up saved search on transaction lines, follow these steps:

  1. Create the Saved Search:

    • Develop a Transaction Saved Search with all necessary filters and columns.
    • Set the appropriate Audience and ensure the search is public. Save the search.
  2. Create Custom Item Internal ID Column:

    • Create a new custom "Transaction Column Field" of type "Integer Number".
    • Set "Applies To" to "Sales" and "Store Item".
    • Mark the field as "Hidden" and ensure its display type is hidden.
    • Configure this field to source the Internal ID of the Item. Save the column field.
  3. Create Custom Pop-up Link Column:

    • Create another new custom "Transaction Column Field" of type "Inline HTML".
    • Set the required "Applies To" (e.g., "SALE ITEM").
    • Set the "Default Value" to the following HTML code, replacing with the actual internal ID of your saved search:
'< a class"dottedlink" href"javascript:void nlOpenWindow(%22&Transaction_ITEM'||{custcol_item_internal_id}||'%22,">https://system.netsuite.com/app/common/search/searchresults.nl?searchid<search_id>&Transaction_ITEM'||{custcol_item_internal_id}||'%22, null, %22widthu0, height 00, resizableyes, scrollbarsYes%22)">Purchase History < / a >'
  1. Understand the Link Structure:

    The provided HTML link utilizes a legacy NetSuite JavaScript function to open a new window, passing the necessary parameters. It constructs a URL that calls the Saved Search's URL and appends the parameter &Transaction_ITEM'||{custcol_item_internal_id}||. This parameter corresponds to an "Item" type Available Filter in the saved search, passing the value from the custom Internal ID column created in step 2.

Expert NetSuite Support

Need help with this NetSuite issue?

Saved Searches & Formulas consulting and configuration support

Talk to a consultant