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
How to attach a streaming PDF file to email?
I have a suitlet which writes a PDF file. This suitlet is used to dynamically create custom info based on parameters.
My requirement: I want to create an another suitlet, and in this suitlet I somehow want to capture this PDF file as a nlobjFile object, and attach this file in nlapiSendEmail.
Is this even possible?
I tried
var responseObj = nlapiRequestURL(''url") var fileObj = nlapiCreateFile('temp.pdf', 'PDF', responseObj.getBody());Didn't workout. And for some reason, the http code is 206 (partial response), and the header is text/html, even though I have specifically set contentType as "PDF" in the PDF generating suitlet. Am I missing something? Is this possible in any other script type (client, user event, portlet..etc)
0