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
ArchieTechie6ArchieTechie6 

Salesforce Knowledge VisualForce Page Error: Unknown property 'Knowledge__kavStandardController.listOfArticles'

Hi All,

I am trying to fetch knowledge articles in my VF Page.

Below is my code: 
<apex:page standardController="Knowledge__kav">
   <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!listOfArticles}" var="details">
                <apex:column value="{!details.articleNumber}"/> 
                <apex:column value="{!details.Title}"/> 
                <apex:column value="{!details.UrlName}"/> 
                </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I am getting below error: 
 
Error: Unknown property 'Knowledge__kavStandardController.listOfArticles'

Can anyone guide me where I am going wrong? 

Thanks!
jigarshahjigarshah
Refer the listOfArticles property within your Visualforce code as below.
<apex:pageBlockTable value="{!Knowledge__kav.listOfArticles}" var="details">
If this does not help, you can use the standard Knowledge Visualforce knowledge:articleList tag as stated in the code below and embed it within your code.
<apex:outputPanel layout="block">
    <ul>
        <knowledge:articleList articleVar="article"
            sortBy="mostViewed"
            pageSize="10">
            <li><a href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a></li>
        </knowledge:articleList>
    </ul>
</apex:outputPanel>
Refer this knowledge:articleList Documentation (https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_knowledge_articleList.htm) to understand further on how knowledge articles can be displayed within Visualforce.

Please do not forget to mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
ArchieTechie6ArchieTechie6
Thanks for the response.
I am very new to SF so I am sorry if I am asking basic question.

As per your suggestion, I tried the below code but I am getting error: Error: Invalid field listOfArticles for SObject Knowledge__kav
<apex:page standardController="Knowledge__kav">
   <apex:form >
        <apex:pageBlock >
            <apex:pageBlockTable value="{!Knowledge__kav.listOfArticles}" var="details">
                <apex:column value="{!details.articleNumber}"/> 
                <apex:column value="{!details.Title}"/> 
                <apex:column value="{!details.UrlName}"/> 
                </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

I want to display Article Number, Title , URL in a table.
Please help !
jigarshahjigarshah
You will need to use the respective article type name as your standardController. So if your Article Type was named as FAQ then your Visualforce code would be as follows. Let me know if that helps.
<apex:pageBlockTable value="{!FAQ__kav.listOfArticles}" var="details">
ArchieTechie6ArchieTechie6
I have my Article Type as Knowledge__kav. But listOfArticles seems to be invalid here. 
If I use knowledge:articleList, it is working fine. 

I am not sure how to get the listOfArticles from Standard Knowledge Object.