• mshim
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I’m a developer that is working on the KnowledgeBase system (PKB2) and featured articles do not work. The out-of-the-box code has the featured articles query populating as below:

String q = '';
q += 'select ' +join(kavFields, ',')+ ' from KnowledgeArticleVersion';
q += ' where PublishStatus = \'' +pkb_Controller.DEFAULT_PUBLISH_STATUS+ '\' and Language = \'' +lang+ '\' and ArticleNumber in :anums’;

Which clearly will not work since you can’t have “in: anums” in a query string, so I fixed that part of it and ran the query again, but there is also a problem when trying to query “ArticleNumber” – it returns 0 in the list on the public knowledge site, but 1 (which is the correct size) when I’m querying it on the Development Console (as a System Admin)

Anyone run into this issue?

  • May 07, 2014
  • Like
  • 0
I’m a developer that is working on the KnowledgeBase system (PKB2) and featured articles do not work. The out-of-the-box code has the featured articles query populating as below:

String q = '';
q += 'select ' +join(kavFields, ',')+ ' from KnowledgeArticleVersion';
q += ' where PublishStatus = \'' +pkb_Controller.DEFAULT_PUBLISH_STATUS+ '\' and Language = \'' +lang+ '\' and ArticleNumber in :anums’;

Which clearly will not work since you can’t have “in: anums” in a query string, so I fixed that part of it and ran the query again, but there is also a problem when trying to query “ArticleNumber” – it returns 0 in the list on the public knowledge site, but 1 (which is the correct size) when I’m querying it on the Development Console (as a System Admin)

Anyone run into this issue?

  • May 07, 2014
  • Like
  • 0