Hi All! Could you please advice what is a proper w...
# suitescript
a
Hi All! Could you please advice what is a proper workflow in this case: I have a suitelet that shows a list of Bill Payments and there is a "Submit" button, upon clicking on the latter button I want to create a pdf file based on the selected Bill payments (where each payment is a separate page in that pdf file), but how I do it? Can I in this case call a Map/Reduce script and generate pdf from there programmatically?
b
the map/reduce is an option if you dont actually need to show the pdf to the user
either way, you will likely need to use N/render to generate the file and use a template that uses a pdfset element
the most basic option is to render each individual pdf and save it to the file cabinet to use with the src attribute
the most common mistake there is not escaping the url
the primary advantage of the basic option is that it allows you to use the same templates normally used for printing, though it wastes a bunch of points and space saving individual files