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
Renaming PDF Attachment Name
Hi all,
I need to send a PDF as an attachment, created through Script. I am able to send the Email and the Attachment but the name is coming as Report.pdf. i want it to rename it to tranid.pdf.
var quote = nlapiLoadRecord('estimate',1234));
//create PDF
var xml = "<?xml version="1.0"?>\n<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">\n";
xml += "<pdf>\n";
xml += "<head><macrolist><macro id="myfooter"><p align="center">Page <pagenumber/>"+'of '+"<totalpages/></p></macro></macrolist></head>\n";
0