function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sanchivan SivadasanSanchivan Sivadasan 

PDF Generation

Hi there,

I have a requirement where I need to generate pdfs for multiple clients where the Data is being pulled from multiple objects. There will also be paging involved as well.

The Object Structure is:

- Tender
          - Opportunity (Maximum 3 opportunities)
                    - Products (N number of productions) - Need paging
          - Customers (Junction Object between Account and Tender)

In the above case, we have Opportunities record types A, B, C. We can have one opportunity for each record type under a particular Tender. So in total we can have a maximum of 3 Opportunities for each tender record.

In the Customers related list, I will have three button's:A Quote, B Quote, C Quote. When the user clicks a button, we need to generate PDFs with quote for all the Customers and attach to Notes and Attachment. So let's say the quote letter for Opportunity record type A is 3 pages for each customer and let's assume we have 3 customers. We will have 3 PDFs.

I want to know the best approach to this problem. Can I leverage visualforce Email template for this? Do I just use visualforce page and render it as pdf? How do I approach this? 

 

Thanks.