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.
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