Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
NetSuite sample HTML wrong?
Hi,
either I'm going mad , or there's something wrong with the documentation.
Under Help -> Guides - search for "Sample Suitelets"
The first script titled: Return a Simple HTML Document (Hello World)
[LEFT]function demoHTML(request, response){ var html = '<html><body><h1>Hello World</h1></body></html>';[/LEFT]
response.write( html );
//prefix header with Custom-Header. See nlobjResponse.setHeader(name, value)
[COLOR=blue]response.setHeader('Custom-Header-Demo', 'Demo');} [/COLOR]
when I just copy the above as is I get:
TypeError: Cannot find function write.
I added: portlet.setHtml(html); to make it work.
0