+ Start a Discussion
RGK.ax912RGK.ax912 

Visualforce email template - article details for a case

I am trying to display the knowledge articles associated with a case in an email template.
The code I am using is:-

 

<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="Case"> <messaging:plainTextEmailBody >

Hello {!recipient.name}-- This is the Article provided for your case Case Number: {!relatedTo.CaseNumber}-- Subject: {!relatedTo.Subject}--

<apex:repeat value="{!relatedTo.CaseArticles}" var="sol"> {!sol.KnowledgeArticle.ArticleNumber}  {!sol.KnowledgeArticle.Id}  {!sol.KnowledgeArticle.ArticleNumber}  {!sol.KnowledgeArticle.ArticleNumber}

</apex:repeat>

</messaging:plainTextEmailBody> 
</messaging:emailTemplate>

 

 

This works to a point in that it will display the details of hte Article Type__ka records for the associated Knowledge Articles, but I want to display the vlaues of the actal Article which are in the Article Type__kav object.
Is there any way to achieve this??
Thanks

francoisLfrancoisL

Hi RGK, 

 

You can create a VF component that will access Article content and add it to the email template. 

RGK.ax912RGK.ax912

Hi

 

Can you give me some details of how to do this.

 

Thanks

 

 

SalesforceDF2011SalesforceDF2011

Hi,

 

Could you please information on how you were able to achieve this. I am trying to create a VF template which would attach the case article.

 

Appreciate your help.

 

Thanks!

francoisLfrancoisL

I'm sorry but I do not have the code for this. Somebody have to code it.