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
dan aponedan apone 

VF page can't call custom fields in articles

We're working with the newly released Public Knowledge Base, found on the appexchange here: http://appexchange.salesforce.com/listingDetail?listingId=a0N300000059QxXEAU

It's great, but I can't get article pages to render the way I need. We want to embed videos (and other raw HTML), and I was provided with a "How to Embed Videos" guide for the old knowledge base. I can make these exact steps work for the new knowledge base. But these steps create a new VF page for the Articles which doesn't have the new features such as Related Articles, email/facebook buttons, the Feedback component at the bottom of the page, etc.

I want to make the off-the-shelf article page display and render my custom fields correctly, and not develop an entirely new page for the articles.


What I'm stumbling with is the ability to call custom fields on Artilces. On the pkb_Template VF page that comes with the Public Knowledge Base, I can call standard article fields by doing the following:

{!theKad.Id} calls the Knowledge Article ID
{!theKad.Summary} calls the summary
{!pkbCon.theAV.Title} calls the Title (and shows different syntax for accessing fields)

However, when I try to call our custom field Article_Body__c, this is what happens:

{!theKad.Article_Body__c} generates Error: Unknown property 'pkb_Controller.KnowledgeArticleData.Article_Body__c'
{!pkbCon.theAV.Article_Body__c} generates the same error.

I've searched lots of forums, and the API developer guide. No clear answer. I've also filed a support case, but wanted to see if anyone had any thoughts. If I get an answer from SFDC, I'll make sure to include it in this thread for others to see.

 

Any thoughts on what should I do now?

 

 

Best Answer chosen by Admin (Salesforce Developers) 
francoisLfrancoisL

Dan, 

 

Did you look in PKB2 Implementation Guide that you can find in Ressources section? There is an example of custom article Template.

 

http://appexchange.salesforce.com/servlet/servlet.FileDownload?file=00P3000000AMCbnEAH page 19.

 

 

All Answers

francoisLfrancoisL

Dan, 

 

Did you look in PKB2 Implementation Guide that you can find in Ressources section? There is an example of custom article Template.

 

http://appexchange.salesforce.com/servlet/servlet.FileDownload?file=00P3000000AMCbnEAH page 19.

 

 

This was selected as the best answer
dan aponedan apone

That did the trick! I had tried that originally and must have made enough bad changes that I messed it up.

 

Starting a clean slate with a new custom template based on the example in the implementation guide is working well now.

 

Thanks!