Posted: 6 Jun 2019 20:57 EDT Last activity: 8 Jun 2019 5:00 EDT
Loop through couple of work cases with HTMLToPDF only generate 1 PDF
I'm trying to generate several PDF by manually triggering an activity that will loop through several Work cases by calling the OOTB method HTMLToPDF to generate the PDF. If I run it with only 1 Work case then it will work and I get the file but when I run this activity with multiple Work case then it will only populate the last case and give me only one PDF. How do I loop through HTMLToPDF to give me one PDF for each Work case with one activity call?
I tried a sample use case to achieve your requirement and attached the document into the pulse note. You can review it and try at your end, please make sure you follow the same names for the parameters. The tricky part in this use case is the iteration of the work objects and storing the Markup content of the each work object into a local variable before we try to generate the PDFDocument which is used to generate the PDF file by HTMLToPDF java code.
Hope this might help you to achieve your requirement.