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

Custom 'Printable View' using Visualforce page
I am very new to Visualforce Pages so I apologize in advance for such a broad question. . I am looking to create a new Button/Link that will open a Visualforce page that simply displays the fields and responses on a simply layout for a user to print (basically the 'Printable View' but with no logos or references to SalesForce. I also don't want it to show any of the headers, sidebars, etc. of SalesForce. I just want it to show the fields and responses as they appear on screen. Very simple, very plain. I tried copying the Source Code of the Printable View link to get me started but I had two issues:
1. Once I added the standardcontroller of my Custom Object in order to get the page to appear as an available option for a custom button, it added in all of the header, side bars, etc.of SalesForce.
2. I also realized that it was simply showing the text of the responses rather than directing the page to pull that records responses. I tried replacing the text that appears in the code with references to the object field but I keep getting errors.
Any advice or an example of how I can accomplish this would be greatly appreciated! Thank you!
I was able to find my own solution.
All Answers
I was able to make a lot of progress on this and my only remaining issue is how to reference fields on the object. I have tried {field name} but that just appears as text on the page. I have tried {!object.field_name__C} and that returns errors. How do I do this?
Below is a small part of the code that is currently working (but I need to replace a lot of the text with a field reference).
Where you see {Audit_Profile_Name__c} and {Owner} is where I want the field reference to be.
Also, the Close Window link in this part of the code appears to have stopped working. Is that an easy fix?
Any help is greatful! Thanks!
I was able to find my own solution.
Can u please share the solution that you found yourself? i am struggling with the print preview option for a visual force page. Thanks in Advance!
This code is unique to our fields but hopefully it will help in what you are looking to do.....