• Marc_LECONTE
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

When I run below soql query in urlrewriter class, I am getting an error.

 

--KnowledgeArticleVersion[] knowledgeArticle = [SELECT Id, KnowledgeArticleId, Language, Title, Urlname FROM KnowledgeArticleVersion where publishstatus='Online'and Urlname =:articleUrlName and (Language = 'en_US' or Language = 'de') ];

 

--KnowledgeArticleVersion[] knowledgeArticle = [SELECT Id, KnowledgeArticleId, Language, Title, Urlname FROM KnowledgeArticleVersion where publishstatus='Online'and Urlname =:articleUrlName and Language = :userLanguageCode];

 

Error: Compile Error: Implementation restriction: When querying the KnowledgeArticleVersion object, you must filter using the following syntax: Id = [single ID], Id IN [list of ID's] or Language = [language ISO code]. In addition Language is only permitted in a top-level AND condition.

 

How can I get rid of language from where condition or how can I dynamically assign a variable to it?

 

Thanks,

R

Is there an easy way to incorporate the contact ID into the visualforce page via an apex class? I have a very basic visualforce page that displays the "Application__c" related list on the contact object.

 

But I want to be able to display this without clicking a button, so I can't pass the contact ID through a link or button.

 

any suggestions?

 

Thanks!