hey all, I’m looking to: send a batch of transacti...
# suitescript
a
hey all, I’m looking to: send a batch of transaction pdfs in an email via a M/R script. Can someone tell me whether to A) batch multiple pdfs into a single pdf (multiple invoices into one long pdf) AND how best to accomplish this or B) just use the render module to create individual pdfs for each transaction and attach them via email.send (there are no pdfs attached to the transactions)?
a
So I've written a script before that goes down path A) - you basically use <pdfset> and put each transaction as its own <pdf> tagset within
a
thing is i am not using advanced pdf, i would just like to use the native pdf
would this still be suitable
a
I think this approach caused the governance to run out by about 25 transactions or so though
let me find the script if i can...pretty sure it shouldn't matter because you're just rendering the PDF based on a custom form
and including that
i do think B) might be the better approach ultimately but i had a client who really wanted a single file
yeah i was just using
render.transaction({entityId:invoice_id,printMode:render.PrintMode.PDF})
then you set a file name and folder for the
file
object returned from that, save it, grab its internal id, and add it to your
<pdfset>
<pdf src="'+xml.escape({xmlText:_fileObj.url})+'"/>';
then render your whole thing with
render.xmlToPdf
anyway that's how i did it; probably not the most efficient
a
nice!
not sure if the client will REQUIRE a single consolidated pdf, so for now i will go with using render.transaction and attaching them to each transaction, then add all the attachments separately, but if i end up needing to consolidate, THANKS SO MUCH!
a
no worries - i spent some time figuring it out back when, so may as well pass the knowledge along
a
wow, i am a fool, there is also a suiteanswer for this, i feel silly
suiteanswer: 46520
👍 1
a
nice!