Common HTML codes to format NetSuite Saved Searches

By - February 28, 2014

NetSuite allows users to manipulate the output of Saved Searches. Basic HTML codes can be added to a NetSuite saved search to format the output results & control the format of the column headers. The following examples show the HTML code, formula and desired output. While the Highlight tab in the Saved Search is great for highlighting entire rows, the following HTML code/formulas allow individual cell manipulation.

Each formula can be cut, copied and pasted in the formula line on the results tab or in the custom label or summary label field. All quotes, commas, <>, etc. are necessary to the formula working properly.

Replace the {field} with the appropriate field in the saved search. To locate the appropriate field, open the field list and choose from the list and/or join records.

HTML Color names can be used (ex: red, blue, aqua, black, green). For more information, perform a Google search on HTML Color Names.

HTML Entity codes can be used to display printable characters (ex: ?, !)

Cloudsuite Blog_Smith_Feb14 5

Cloudsuite Blog_Smith_Feb14 1

Cloudsuite Blog_Smith_Feb14 2

Cloudsuite Blog_Smith_Feb14 3

** To obtain the image source:

  1. Upload the image in Documents > Files > Images > New
  2. Save the image
  3. From the saved image, copy      the URL beginning at /core/media      and paste into the formula string. The url generated by the saved image      file will be different than the one seen here:

‘<img src=”/core/media/″>’

Cloudsuite Blog_Smith_Feb14 4

NOTE: Exporting the results of a saved search with HTML coding will export the exact HTML code. See below to remove HTML coding from an exported file in Excel.

Remove HTML coding from an exported saved search in Excel.

To get around this issue, you can create a Macro in Excel to strip the HTML tags from the Excel file.

1. Open up the VBE with Alt+F11 and locate your workbook in the top left Project Explorer window.

2. Right-click on your workbook and choose Insert > Module.

3. Paste the code in to the code module that will open (see below)

4. Go back to Excel, select the cells you want to edit (those with HTML tags)

5. Developer > Macros > Run > Remove Tags or Activate the macro with Tools > Macro > Macros

6. This is a very slow process.

7. Verify the results in excel

 This is the code for the Macro:

  • Sub RemoveTags()
  • Dim r As Range
  • Selection.NumberFormat = “@” ‘set cells to text numberformat
  • With CreateObject(“vbscript.regexp”)
  • .Pattern = “<.*?>”
  • .Global = True
  • For Each r In Selection
  • r.Value = Replace(.Replace(r.Value, “”),” “,” “)
  • Next r
  • End With
  • End Sub


If you have questions with how to add HTML code to your Saved Searches or would like support for your NetSuite solution, contact our professionals at or via phone at 855.437.7202.

By: Monica Smith – Iowa NetSuite Solution Provider

Receive Posts by Email

Subscribe and receive notifications of new posts by email.