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
Vadivel MuruganVadivel Murugan 

How pass Id and Type in email template

Hi,

I have create a visualforce page with controller. I have create a button "send" when click this button that time i have call the email template. In my email template i have use " Component". But that time <c:PricelistFAELcontroller1 Serviceid="{!relatedTo.id}" ServiceSheet="{!relatedTo}"/>.
b
ut here my id, and type not populate in visualforce page into visualforce email template. How to pass id,object type into visualforce page into visualforce email component. Any one konow reply me.
BharathimohanBharathimohan
Hi Vadivel,

This is due to the sequence of operation. i.e. constructor loads fist and then the getter setter methods. If you check for these attributes inside the constructor, then the values will be null.

Create a separate method instead of constructor and call them inside setter method one of the variables.


Example:


public Id ServiceId    
{        
       get;         
       set
       {             
           ServiceId= value;
           call_your_method_here();         
       }     
}

Regards,
Bharathimohan Ramaurthy
Salesforce For All (http://salesforceforall.blogspot.com/)