Linking to Records in NetSuite Saved Searches

Steven Hall
3 min readApr 2, 2021

Saved searches are a powerful tool in NetSuite (we often find them more helpful than the reports feature!), but there is one limitation that can be frustrating: Accessing associated records without opening the search results individually, especially when you’re using summaries in your results. Read on to see how you can utilize the “Formula (Text)” field to make quick links!

Links to Associated Records within NetSuite Search.

To avoid the need of drilling into each result on a saved search, you can use the results returned in your search to create the link directly. The trick is adding an HTML link via the “Formula (Text)” field.

Let’s say you’ve created a great search on Item Receipts, but you’d like to be able to open the associated Purchase Order without drilling down. Simply follow the instructions below to add a quick link.

First, add a Formula (Text) field to the results section of your results. Next, enter an HTML link surrounded by single-quotes:

'<a href="LinkGoesHere">Link Text Here</a>'

Now, this particular link wouldn’t go anywhere (“LinkGoesHere” certainly doesn’t exist), but we’ll build it out easily.

Build our link

First, in a separate tab, open the record type you want to link to; in this case we’ll open a Purchase Order. Now copy the URL to that record. We’ve copied:

https://COMPID.app.netsuite.com/app/accounting/transactions/purchord.nl?id=4262238&whence=

Note that COMPID will be your NetSuite company ID.

Next, delete all of the text after “?id=“ to get a link such as:

https://COMPID.app.netsuite.com/app/accounting/transactions/purchord.nl?id=

This link is what we’ll use in our formula. You’re probably already noticing what we’re after; we’re going to set the id number via the search results.

In order to get the ID of each Purchase Order as associated to the Item Receipt, we can use the Created From fields option to get the Internal ID value. This looks like {createdfrom.id}. So all we need to do is append this value into our link from above.

Let’s put it all together

First, replace the LinkGoesHere text with the generic link we created earlier:

'<a href="https://COMPID.app.netsuite.com/app/accounting/transactions/purchord.nl?id=">Link Text Here </a>'

Now, we’ll need to pipe-in the Created From ID value.

Piping in field values in a Formula (Text) field is achieved via closing the single quote that you started the initial text with, adding double pipes: ||, then adding your next text value in single quotes again.

If you haven’t used pipes in a Formula(Text) field before, don’t worry, here’s our sample with exactly that:

'<a href="https://COMPID.app.netsuite.com/app/accounting/transactions/purchord.nl?id=' || {createdfrom.id} || '">Link Text Here </a>'

Dynamic labeling

At this point, our link would work, except every link will say “Link Text Here”, and that’s not very helpful. So let’s replace that text with the Purchase Order document itself. This can be inserted using {createdfrom}. We’ll need to pipe that value in as well:

'<a href=“https://COMPID.app.netsuite.com/app/accounting/transactions/purchord.nl?id=' || {createdfrom.id} || '">' || {createdfrom} || '</a>'

Putting it all together

All done!

That’s all there is to it. To review, create a Formula (Text) field with a generic URL link to your chosen record type, pipe in the internal ID of the record you want to link to, and pipe in the value you’d like for your link to appear as.

--

--