3

I'm having some trouble editing the content of a Managed Email Template, I can quite easily modify the content of the Email Template, but when I wish to refer to an unmanaged component, like this:

<messaging:attachment renderAs="PDF" filename="invoice.pdf">
    <c:MyComponent/>
</messaging:attachment>

I get the error message:

Error: Unknown component c:mycomponent

Does anyone know if its possible to embed an unmanaged component in a managed Email Template?

1

I think because your email component is managed, it is expecting that MyComponent is also part of the same managed package, and since it is unmanaged it is giving you the error. I don't have any documentary evidence supporting this, but have certainly experienced the same issue.

I believe the only resolution is to make an unmanaged email template, or copy the visualforce contents of the component to the managed template. Both of these are not ideal since they may not work if the component also relies on a controller, or the managed template is used from a button or something within your managed package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.