You need to sign in to do that
Don't have an account?
Knowledge Management API
Hi,
Trying to display custom field "Description__c" that is part of "Article Type" object. I am not able to access that field from knowledge API.I get "Authorization Failed" error.
For clarity, the VF page is called from public force.com site. The code described below was extracted from SFDC app exchange - "Public Knowledge Site". The code works fine when standard field is referenced.
Here is sample code:
<apex:outputPanel layout="block">
<ul>
<knowledge:articleList articleVar="article"
categories="products:phone"
sortBy="mostViewed"
pageSize="10"
>
<li><a href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.description}</a></li>
</knowledge:articleList>
</ul>
</apex:outputPanel>
Any clue ?
Hi,
With knowledge:articleList VF component, you cannot access custom field available on your article type. You can only display standard field as title, summary, url_name.
If you want to dislay custom field, you need:
- Create article list using SOSL/SOQL querying on your article type object (eg: FAQ => FAQ_kav)
- use articleList VF component but a second SOQL query to get the custom field.
Does that make sense?
All Answers
Hi,
When you go to the site and click on public access settings, check the field level security once. Visible checkbox must be selected. I came across this situation, and when I checked the settings, the custom fields were not made visible by default.
Hope this helps you.
Hi,
With knowledge:articleList VF component, you cannot access custom field available on your article type. You can only display standard field as title, summary, url_name.
If you want to dislay custom field, you need:
- Create article list using SOSL/SOQL querying on your article type object (eg: FAQ => FAQ_kav)
- use articleList VF component but a second SOQL query to get the custom field.
Does that make sense?
If I use knowledge:articelList tag on a page inside a public force.com site, I get blank list. Do I need to use any standard controller? Here is my component code:
In this configuration, the tag is only going to show most viewed article published in last 30 days. To bypass this, you will need to specify a category (it can be All) and in this case the 30 days condition will not be taken in consideration?