You need to sign in to do that
Don't have an account?
Email Template
Error: Invalid child of messaging:emailTemplate. Only messaging components are allowed as children of messaging:emailTemplate.
I cannot use messaging attachment tag inside of apex repeat...I want dynamically iterate..
Please help for me.....
<apex:component access="global" controller="InvoicePdfControllerAttachment" allowDML="true" >
<apex:attribute access="global" assignTo="{!accountId}" name="BookingAccountId" type="String" required="true" description="Account Id"/>
<apex:attribute access="global" assignTo="{!bookId}" name="BookingId" type="String" required="true" description="Booking Id"/>
<apex:repeat value="{!bookList}" var="a">
<messaging:attachment renderAs="PDF" filename="Test">
</messaging:attachment>
</apex:repeat>
</apex:component>
This is because you are trying to use <messaging:attachment> inside the repeat tag in the component. this is not allowed.
See more information in the thread below,
http://salesforce.stackexchange.com/questions/12899/using-a-component-to-add-attachments-to-visualforce-email-template-and-showing-e
Regards,
Ashish