Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Custom Hyperlink Outputs in NetSuite Saved Searches

NetSuite Reporting Technical

Tags: , , , , , ,

I love NetSuite Saved Searches.  Especially the way you can schedule reports to run and distribute via email according to one or more column names representing a person such as a contact, employee, customer, etc.

One challenge is situations where the saved search output does not supply a hyperlink back to specific NetSuite records.  The most prominent example is when you create NetSuite summary saved searches.  So here is what you need to do to get hyperlinks in those saved searches:

Add Hyperlink as a NetSuite Saved Search Formula Field

  1. Get the hyperlink to any target record you are seeking to link to.  For example, this link will take you to customer records: https://system.netsuite.com/app/common/entity/custjob.nl?id=17476  We are going to work to replace 17476 in our example with the ID you need.
  2. Create a Saved Search Result based Formula Field (Text).
  3. Determine the field that has the internal ID of the record you are after.  It typically is {internalid}.  However, if the data is in a join from another related table, it may look something like {customer.internalid}.
  4. Follow the text design pattern below depending on the type of search you are creating.

NetSuite Standard Detailed Output  Saved Search

Use this snippet to effectively pop open a new window when you click on the “Link”.
'<a href=https://system.netsuite.com/app/common/entity/custjob.nl?id=' || {internalid} || ' target=_blank>Link</a>'

NetSuite Group By Summary Output  Saved Search

Use this snippet for summary fields and make sure you select “Group” for your summary type.
NVL2({customer.internalid}, '<a href=https://system.netsuite.com/app/common/entity/custjob.nl?id=' || {customer.internalid} || ' target=_blank>Link</a>', '')
Note, in the example, I used the NVL2 function which effectively works in child table situations.  For example, you may have times where data may or may not show up in related children records.  This approach only displays a link if indeed we get an ID.
This URL in Saved Search technique makes NetSuite even handier to work with.   Let me know if you see other ways to make this technique even better.

Addendum 2023

Note, since I authored this article over 10 years ago, in 2012, NetSuite now demands that you use “Formula (HTML)” fields versus Text to make this technique work.  Be sure to have the “Disable Html In Search Formula (Text)” set to Off in the Setup –> Company –> General Preferences.

If you found this article relevant, feel free to sign up for notifications to new articles as I post them. If you need assistance with your advanced saved searches, let’s have a conversation.

Marty Zigman LinkedIn

Marty Zigman

Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

BiographyYouTubeLinkedInX (Twitter)

65 thoughts on “Custom Hyperlink Outputs in NetSuite Saved Searches

  1. I can’t say how to make it better, but what would be better if there was some way of determining the context of where the saved search was being invoked, in order to keep the base part of the url correct. As it is, one would have to modify the saved search when moving from a sandbox to live environment (i.e. changing the base part of the url from https://system.sandbox.netsuite.com/ to https://system.netsuite.com/)

    Reply
  2. I have created Saved Search and added Hyperlink to one of the field using formula(text). But whenever i am trying to export that results, it is giving me complete anchor tag details as a text. Is their any workaround to export only link text and not the complete anchor tag details.

    Reply
  3. Hi, much appreciated for this info. I’m also hoping when export to excel or pdf, it will not showing the full text of the link.

    secondly i’m wondering at the end of the sentence target=_blank>Link. could you change the text Link to one of the field? for example the text “Link” changed to a tracking number of shipment from one of the field

    Thanks and much appreciated your help in advance

    Reply
  4. Thank you so much Marty! I have been struggling with links in grouped searches and this has solved my problem. In this case I provided the links within a detail column, using two of your posts. We had turned on multi-locations and were trying to create a search displaying items that had inventory available in the non-preferred location and where there were backorders in the perferred location. We ended up using this formula successfully to show the orders that were backordered:

    ” || REPLACE(NS_CONCAT(TO_CHAR(case WHEN {locationquantitybackordered}>0 THEN ‘‘ || {transaction.number} || ‘‘ ELSE NULL END)), ‘,’, ”) || ‘</d

    Reply
  5. Hi Marty,
    Not sure if you can help – but I’d really appreciate it. I’ve just launched a new VOIP system that has the ability to ‘pass’ the caller ID to Netsuite with a variable – but I can’t figure out the Netsuite URL (where “%P” would be the phone number I want to search in Netsuite). Any suggestions?

    Thanks in advance.

    Reply
  6. Hi, I was curious if there is a simple formula for populating the results in a column in a saved search results.

    More specifically. We have a comparison shopping product feed. I would like to have the results column include our account number. I would rather not create a custom field and populate all 5K item records if I dont have to.

    I would like to do it with a Text formula. Then have the formula include the value that will be displayed in the column.

    Thanks in advance for the help.

    Reply
  7. I used the link you posted aboved to link to another saved search.
    in both search we are using a unique SN(serial number)
    I would like to click on the row of a certain SN to access the second search looking for this specific SN.how can i achieve it?
    Thanks in advance for your help.

    Reply
  8. I see the question asked in the comments twice, but I am cannot find an answer. When exporting a saved search with a formula text hyperlink, it shows the text in excel, it does not display it as a link. This effectively makes the link only helpful when linking directly off the search. In the case of sending out the search as a scheduled task, it becomes a useless column. Then in my case, I have to send the search results via email because otherwise it will timeout, so I the link never does me any good. Is there a workaround? Here is my formula (text) Maximum:

    case WHEN {type} = ‘Inventory Item’ THEN ‘Edit ‘ || {name} || ‘‘ ELSE ” END

    Reply
  9. Hi Marty,
    while exporting saved search from NetSuite i want to display image hyperlink as a image in excel sheet.
    Can you please help me with out using macros how to display hyperlink as a image

    Reply
  10. This has been extremely helpful in so many situations. Thank you for sharing this!
    Recently, however, it seems to prompt for a login when I use the link before proceeding to the record even when though I was logged in to view the search results. Any thoughts on how this intermediary step of logging in again each time can be avoided?

    Reply
  11. Hi Marty,

    From a saved search column, can i link another saved search.

    So for example, In Events view, I am getting registration count as a column with value as 5 and now if I will click on 5 then in other popup, I should get details of those 5 users. Please let me know if this is possible and if yes then please share steps to do same.

    Reply
  12. Hi Marty,

    Have you had any experience doing html formatting of Saved Search results? I’ve found some resources on how to format single cells (highlighting, bolding, etc.) in search results, and they work great, but I can’t seem to find a way to apply those rules to summarized (sum, group, etc) results.

    Is there a way to apply formatting to summarized results?

    Reply
  13. Hi Marty,

    I was wondering if it’s possible to show the link as a field name in NetSuite

    In your example you have

    ” target=_blank>Link’

    I was wondering if it’s possible to do

    ‘ target=_blank> {interalid} ‘

    or another field to add a descriptor to what the link is for

    Thanks for your help!

    Reply
  14. Is there a trick to do that? Whenever I put a field in, it always ends up showing “{internalid}” instead of the result of the field.

    Reply
  15. I am trying to create a URL link in a saved search in NetSuite for Cost of Sales. The cost of sales search pulls all transactions regardless of type (i.e., Credit Cards, Bills, Expense reports, etc.). However, depending on the type, the URL link to the transaction needs to change for it to link correctly. For example, Bills will have a URL with vendbill (app/accounting/transactions/vendbill.nl?id=484446&whence=) and credit cards will have cardchrg (app/accounting/transactions/cardchrg.nl?id=485330&whence=).

    Is there way to write the formula so the URL will have the correct type in the link?

    Reply
  16. Thanks for the tips Marty! I tweaked this to get default images.

    ‘https://www.url.com/images/’ || case when ({parent} is NULL) then {image_prefix} else {parent.image_prefix} end || ‘_01.default.jpg’

    Reply
  17. Hi Marty, thanks for the tips on cust. hyperlinks.

    Could I ask pls how to set the Formula in case I want to use the hyperlink also in Suitelet?
    I mean if I create Suitelet out of the Saved Search, which includes this custom hyperlink, I want to see clickable link also in that Suitelet. What I see now is just the text of the Formula.

    thx in advance

    Reply
  18. Hi Marty,
    yes I tired also these two custom fields before.
    HyperLink field is again displayed as just text, not clickable link on SuiteLet.
    Inline HTML field cant be even added into RESULTS on Saved Search.

    Thx in advance for your further ideas.
    Nevo

    Reply
  19. Is there a way to reference hyperlink as an image? For instance if I want to call an action to send email with an email icon or image?

    Reply
  20. Hi Marty,

    I have a custom field on my customer record which has an external URL to the salesforce account – is there a way I can use Forumla(Text) to have the work ‘Link’ on the results, which takes them to that URL?

    Thanks!

    Reply
  21. Hey Marty, Just wondering if it possible to give a customer a link to their own URL for their transaction within an email.

    Example, I have added a button to the email template which says “Click here to view your quote” which would take them to their PDF version of the quote.

    Let me know if there is a way for this to be done and accessed without logging into the customer portal. (as we are not using this feature currently).

    Reply
  22. Do you know if there is a Preference or global setting or individual saved search setting that allows this to work. I’ve tried and it won’t work. When I copy in YOUR example in the article, it works – it generates a working link. (The link goes to a page that says the record does not exist, which is fine, of course.)

    However, I’ve tried dozens of times, making adjustments to the URL in MY SYSTEM, where I’m ADMIN, and it always gives an error in the column in the results instead of a link: “ERROR: Invalid Expression”

    My link (with the leader URL numbers changed for privacy):

    link

    Reply
  23. Thank you for your response. Perhaps I was unclear in my description. I have worked quite slowly and spent hours in total. I have successfully used the technique for all kinds of URLs including things like https://www.google.com. So I gained confidence that my syntax is correct. I can now see in my original post that the comment system here converted the actual code I copied into the comment to ‘link’, which is dead. I figure that must be a security feature of the comment board? I wonder if I chop up the link with some intentional spaces if the comment system would allow me to share it?

    Reply
  24. Hi Marty,

    I’m trying to add this Default Value in Inline HTML field with Formula: TRUE but I get an error saying this formula has an error. I’m trying to pass the lineUniqueId param to the suitelet URL and open it in a dialog box. i tried various syntax with single quote around the lineuniqiekey but it still has error. Is this even possible to do? the following is the default value i’m trying to set.

    Roll Record

    Reply
  25. Marty:

    Now that NS has added the account number to the URL, it’s better to make the URL be a relative URL and then the browser prepends the correct account number in front of the “/app”

    ‘/app/common/entity/custjob.nl?id=’

    Also, if you leave what you have “system.netsuite.com” that still works and NS server will resolve that to the correct account number, BUT it’s 1 extra post, wait, response, so it’s slower. The relative URL saves that extra post and return so it’s faster.

    Reply
  26. Hi Marty, So I use this technique for billing sales orders. We do our fulfill and bill process at the same time, so I created a SO saved search that has links to Fulfill and Bill. These links work fine, but when i click save and the browser refreshes, it reverts to the saved search instead of the completed transaction record. Do you know if there’s any way to change this behavior?

    Here’s examples of the hyperlink code for reference. Maybe it can also help someone else.

    Formula (HTML)

    Fulfill

    Bill

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *