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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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