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
davecrusodavecruso 

Visualforce E-Mail Template (not) populating with data - Thoughts?

Hi all, 

 

Following up from an earlier thread; we have created a Visualforce e-mail template that we are calling through a trigger. When we preview the e-mail template with data that we enter (via preview), it works.

 

However, when the e-mail is sent via trigger upon the creation of a new entry in the object, the e-mail is sent without information populating the Apex fields.  

 

Does anyone know why this happens, and what steps we can take to remedy / explore for a remedy? (We have the latest release of SF)

 

Thanks!

--Dave 

Best Answer chosen by Admin (Salesforce Developers) 
Nick1746323Nick1746323
have you used the "setWhatId" method to pass the Id of the record?