Chapter 07
PDF and email
The content is written once. Showing it on screen was the first output: a PDF download and an email are two more, and both reuse the same document.
Pega 24 – 26
Words you will meet
- PDF download
- Inline CSS
Optional
A PDF to download.
Use the GenerateAndDownloadPDFDocument activity for a direct browser download. This is the recommended choice for Constellation.
Activity: GenerateAndDownloadPDFDocument DocumentID = DOC0003 Filename = PaymentReminder.pdf PageOrientation = portraitWire it to a Download PDF button on your view, the same way as the Generate Document button. For a PDF, you can now fill in the Header Footer Paragraph ID on the document, which you left blank for the browser.
Optional
Send it as an email.
Activity: GenerateAndEmailDocument DocumentID = DOC0003 To = << pyWorkPage.CustomerEmail >> Subject = Payment Reminder EmailAccount = (your email account name)The To value reads a property from the case, so your case needs one that holds the address (here called CustomerEmail).
Your turn
Questions and comments
Stuck on something, or have a thought? Write it here. To talk about one part, use the Comment button under that section's heading.