You need to sign in to do that
Don't have an account?

Display fields on Visualforce Pdf
Hi, I have a few record types in our system and each record type has different page layout. Each page has almost sames fields with small variations. I have created a visualforce page pdf for the detail page and a button on detail page, which by clicking generates pdf of the detail page. But since there is a small variation in each page layout, I don't want to create many visualforce pages. Is there a way to display fields dynamically on visualforce pdf based on the record type/page layout?
Try using Field Sets, create a fieldset for each of your record type, based on record type of id you can pick the right field set from controller of page, and you can display them on vf page, below is reference for that:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm