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
kaustav@home.comkaustav@home.com 

components used in email templates are not rendering

Hi, I have created a component which refers to a controller. In the component I have called a method which passes a wrapper list. When I try to render the component in the email template, I receive the email without the component being rendered. I have tried both plain text as well as html email templates.

 

Email template:-

 

 Dear ICO Admin users,
             The following new users have been added to the Mandatory Reporting application: 

              <c:userCreationEmail/>

 

Custom Component:-

 

<apex:component controller="amr_email_utils" access="global">   

<apex:dataTable value="{!UserLink}" var="myVar">       

<apex:column>           

<apex:facet name="header">User Name</apex:facet>           

<a href="{!myVar.strUserLink}">{!myVar.userObj}</a>       

</apex:column>   

</apex:dataTable>

</apex:component>

 

Wrapper Class:-

 

public class clUserLinkWrapper

 {

public String userObj{get;set;}

public String strUserLink{get;set;}

public clUserLinkWrapper(String strInsertedUsers,String strUserIdLink)

{

this.userObj = strInsertedUsers;this.strUserLink = strUserIdLink;

}

}



 

 

From the controller, I am passing a wrapper list of users along with their login URLs. All the static data along with other relatedto fields in the email get printed except my custom component. Can someone please help me in this? Thanks in advance!!

kaustav@home.comkaustav@home.com

Hi Nylon,

 

Yes, its a duplicate. I have posted it in 2 categories under general dev and apex code dev so that I could get someone's reply at the earliest. Thanks for checking in.