When printing records in NetSuite using Advanced PDF/HTML Templates, there are third party libraries used for generating the documents to PDF format. One of the major libraries is Freemarker (Engine template) with BFO (Used to convert XML to PDF).
According to BFO documentation, the “href” tag is supported but with some limitations. Given the example:
<a href=”https://www.solease.nl/prijs-kwaliteit/” target=”_blank”>Veelgestelde vragen</a>
The “target” attribute, which is responsible for opening the hyperlink on another tab/window, is not supported. Therefore, it won’t allow the hyperlink content to display in a new tab/window.
Solution
- Navigate to Customization > Forms > Advanced PDF/HTML Templates
- Preferred Advanced PDF/HTML Template: Click Edit
- Source Code: Click Toggle Switch
- Add the following codes:
<textarea cols="50"><a href="javascript:app.launchURL('http://www.google.com/', true);">Click here to go to Google in a new tab or window</a></textarea> - Click Save