Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Printing search results as a pdf using advanced html template
I think I am missing something as this code works without any errors, but the only thing the page contains is "render.TemplateRenderer". Any insight would be helpful
/**
* @NApiVersion 2.x
* @NScriptType Suitelet
*/
// This sample shows how to render search results into a PDF file.
define(['N/render', 'N/search', 'N/file'], function(render, search, file) {
function onRequest(options) {
var request = options.request;
var response = options.response;
var SOsearch = search.load({
id: '2277' //'customsearchitem_label_print' //the ID of the saved search
});
var resultSet = SOsearch.run();
var results = resultSet.getRange(0, 10);
//var results = SOsearch.getRange(0, 100);
//var xmlTemplateFile = file.load('Templates/PDF Templates/invoicePDFTemplate.xml'); //this will be the template file filepath