Posts

Showing posts from July, 2015

Send Pdf Using Visualforce Email Template

Requirement:  Suppose you have a Object(Invoice__c) Record , There is  isSend Checkbox field , When  isSend = true then email goes to Admin user with Pdf Attachment. In Pdf there in Object Data and Related Child data in Table. Solution : For this you have two solution 1) Create a future call out class and write a trigger , In future class u can get pdfcontent 2) Using visualforce Email Template I m explaining Second one. We need to create Custom Component. Setup>> Develop>> Component>> New Component Name: GenrateInvoiceComponent and Create a Class  GenrateInvoiceComponentController Step 1: Create a Class GenrateInvoiceComponentController       GenrateInvoiceComponentController  Class Code Example public class GenrateInvoiceComponentController {     public string InvoiceID{get;set;} // this invoice will come from Url Public List<InvoiceLineItem> lstofChildRecortd{get;set;}        public string GenrateInvoiceComponentController