You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Generate PDF from newly created record
Hello All,
Hopeone someone can steer me in the right direction here. I am saving a record from a user entered VF page. What I need to do is generate a PDF of the newly created record and attach it to the record. I have a new VF page using (renderAs= PDF) and an Apex Class to grab the data to populate the VF but I need to make sure that the data has been saved first before generating the PDF. Also, how can I save it to the new record? Is there a better way to do do this or am I on the right track?
Thanks,
P
Hopeone someone can steer me in the right direction here. I am saving a record from a user entered VF page. What I need to do is generate a PDF of the newly created record and attach it to the record. I have a new VF page using (renderAs= PDF) and an Apex Class to grab the data to populate the VF but I need to make sure that the data has been saved first before generating the PDF. Also, how can I save it to the new record? Is there a better way to do do this or am I on the right track?
Thanks,
P
Hope you are doing well....!!!
You can use below code. Hope this solution helps you...!!
Regards,
Foram Rana
All Answers
Hope you are doing well....!!!
You can use below code. Hope this solution helps you...!!
Regards,
Foram Rana
Thank you for the reply. How is the 'objCon.email' value obtained? If I need to get teh id of teh record from the record that was just created how can I do that? Am I appending the code below ' //INSERTING FILES' into my existing code? So if you recall I have a VF page that a user enters data and they save the record. I created another VF(PDF) and Class but was not sure how to tie it together. Do I need a seperate VF page to generate the PDF?
Thanks for your help and time.
Cheers,
P