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
DianeMDianeM 

Namespace issue with package email

I have a managed package which contains several standard email templates.  The idea is that when specific events occur, background code can send emails.  The intent is that customers can change the email template after installation to meet their requirements.

 

My email template invokes a component that is the PDF attachment to the email.  When I attempt to replace the component, I get an error message saying it is undefined.  I think this is a namespace issue but I haven't been able to prove or disprove it.  The email template is here.  When I replace the component with my new one, the save fails.  I know the component is there and works because I have tested it from a standard visual force page.

 

 

<messaging:emailTemplate subject="A purchase order." relatedToType="SCMC__Purchase_Order__c">

<messaging:plainTextEmailBody >
    Attached please find a purchase order.
</messaging:plainTextEmailBody>
<messaging:htmlEmailBody >
    Attached please find a purchase order.
</messaging:htmlEmailBody>
<messaging:attachment renderAs="PDF" filename="PO.pdf">
    <c:PurchaseOrder poId="{!RelatedTo.id}" />
</messaging:attachment>
</messaging:emailTemplate>

 Does anyone have any ideas what a work-around may be?

 

Thanks,

 

Diane