function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rohan SarafRohan Saraf 

Send an pdf generated through the Visualforce Page in an email

Hello All...

I have a visualforce page that generated the details of the particulart record on click of the button.
Now I have to send the email in which there will be pdf attached of the details of that respective record.

No the issue I am facing for the email template using the HTML Format that the field of that respective standard controller object are available but not of the related objects i.e the merging fields.

can any one help me with that....????

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Rohan,

May I suggest you please refer the below link for reference. Hope it helps.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks
Rahul Kumar
Rohan SarafRohan Saraf
Hi Rahul,
Thank you very much for your concern actually I tried this method you suggested and now  the PDF got successfully generated and attached but the Problem caused is that the "PDF IS Completely blank".Here am attaching  the Screenshot .

Could Please suggest anything on it...!!

User-added image
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Rohan, hope it helps

Thanks
Rahul Kumar
Rohan SarafRohan Saraf

It is not the problem that the PDF is coming blank, only the PDF which is getting attached to the email is coming out to be blank.

I also have button of onclick javascript...

It generates the PDF Properly...!!!