You need to sign in to do that
Don't have an account?
Neeraj Sharma 103
Hi Experts i have a Simple vf page and in vf page some fields are input and a save button
Hi Experts i have a Simple vf page and in vf page some fields are input and a save button when user fill the form and then clicked on save button then the data will be stored as a pdf and download it
So Any Example how to achieve this functionaliy
So Any Example how to achieve this functionaliy
Try the following example it works according to your requirement:
Apex-Page:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
All Answers
You can go through this link. It will help you
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm
Thanks!
You will need the following:
1. A visualforce page which is rendered as PDF (I believe you already have it)
2. Create a new VF Page and a Controller. The Controller will do a getContentAsPDF for your PDF page. The blob that it gets from the PDF page, it will store it as an Attachment under the record.
3. Add a button on your object which will the call the VF page in point 2.
You can read this in more details at the following links:
http://raydehler.com/cloud/clod/apex-pattern-save-and-open-pdf-from-button.html
https://blog.jeffdouglas.com/2010/07/14/attach-a-pdf-to-a-record-in-salesforce/
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
this is my vf page when i clicked on save button then the values input by users in field will download as pdf
Try the following code of vfPage ,Convert a page to PDF by changing the <apex:page> tag to <apex:page renderAs="pdf">.
So try the following code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
When i preview a vf page in developer console then its show as a pdf when i used renderAs="pdf" but my requirement is user input the record in fields and then clicked on save button then the values fill up in the field will be download as pdf after clicked on save buton
Thanks
Neeraj
Try the following example it works according to your requirement:
Apex-Page:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi