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