+ Start a Discussion
gilbert8109gilbert8109 

Can I fill in a Visualforce PDF page with data from multiple records?

Is this possible, and if, so how do I do it?

 

It's a pretty simple problem.  I have a custom object called "XYZ Object" .  I created an page in Visualforce that is rendered as a PDF page.  Right now, it's not pulling in any data.  It's just a plain old page with hard coded text in it.

 

What I want this PDF page to do is pull in the record names from the XYZ object records.  I can get dynamic field references to work here by making the page a button on the detail page of the XYZ object records, but what I'm having trouble with is getting the page to populate with the record names across multiple XYZ records.

 

What I want to do is post a link to this VF page on a tab, so everyone can go into it and see the pre-populated values of the XYZ record names in it. 

 

Is this possible?  How can it be done?

gilbert8109gilbert8109

where is nick burns when i need him

Pradeep_NavatarPradeep_Navatar

You can fill your pdf data with multiple records. You can call onsubmit attribute of <apex:form> and in controller you can call this method:

                     public PageReference getpdfValues()

                     {

                     Id occrId = ApexPages.currentPage().getParameters().get('id');

                     // your business logic here.

                     }