I have an array of quotes and want to print them a...
# suitescript
n
I have an array of quotes and want to print them all using a template. I am using this for one record but want one pdf for multiple quotes.
Copy code
renderer.addRecord('record', record.load({
  type: 'estimate',
  id: getquoteid.custrecord_dc_wo_line_related_quote[0].value
}));

renderer.setTemplateById(quoteWOTemp);
r
Nicholas,
I did this with two saved searches. One for parent level and one with line item details. The iterated through parent and then grabbed sub items. It is not the best.
n
Hm, i kind of need two seperate pdfs for each record and then combine them so i don't open like two tabs or something
r
Also if you dont mind them being on seperate pages, you can render each one in a loop and concat the pdfs
you can concat pdfs insife a primary template
just pass in your array into like something below
Copy code
render.addQuery({
    templateName: 'itemSearch',
    query: itemQuery,
});
could possibly also do with mailmerge apis but dont email it.
n
hm okay, a couple good options to try
r
also script side pdf concatenating
n
what do you mean @redfishdev?
n
Depending how you're creating your pdfs you can combine PDFs using <pdfset> I'd search/ask in advancepdf channel