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
- 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.
- Create a Saved Search Result based Formula Field (Text).
- 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}.
- Follow the text design pattern below depending on the type of search you are creating.
NetSuite Standard Detailed Output Saved Search
'<a href=https://system.netsuite.com/app/common/entity/custjob.nl?id=' || {internalid} || ' target=_blank>Link</a>'
NetSuite Group By Summary Output Saved Search
NVL2({customer.internalid}, '<a href=https://system.netsuite.com/app/common/entity/custjob.nl?id=' || {customer.internalid} || ' target=_blank>Link</a>', '')
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.
Hello Tom,
I am confused. If you have it working with the code I supplied, then why are you having trouble? Perhaps try to craft your URL very slowly as I suspect it has something to do with a syntax problem.
Marty
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?
Hi Tom, if you can send a link to a screenshot, that would help. Or, contact me at https://www.prolecto.com/contact-us/ so that we can set up a separate conversation so I can see better see the details.
Marty
Hello marty, is it still work now? because i try this , but it show the exact formula with anchor tag
Hello Famau,
I have heard that NetSuite may shut down the ability to have HTML come out of saved searches. I sent notes to the NetSuite Product team urging them to reconsider this so-called enhancement. Is this a relatively new NetSuite account you are working on?
Marty
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
Hello Dhruval,
I recommend adding syntax elements slowly to build up complexity to confirm you are getting this to work. Also, make sure you have the global switch ON to allow HTML in Formula Saved Searches in Setup, Company, General Preferences.
Marty
Marty
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.
Nick,
Thank you. It totally makes sense to use relative URLs when you know that your saved searches are going to be consumed while logged into NetSuite. Yet, if you distribute the results of that search externally, then an absolute URL will be needed.
Marty
Hi Marty,
The latest update now outputs this as text, any ideas how to get it back to a working link?
Thank you Scott. I added an addendum to the article.
Marty