list<string> setknowledgeArticleIds = new list<string>();
setknowledgeArticleIds.addAll(knowledgeArticleIdToHS_Sync.keySet());
knowledgeQuery = 'SELECT Id ,KnowledgeArticleId , ' + title + ',' + answer + ' FROM ' + articleType;
knowledgeQuery += ' WHERE PublishStatus = \'Online\' AND language = \'en_US\' AND KnowledgeArticleId IN :setknowledgeArticleIds ';
throwing an error : System.QueryException: Variable does not exist: setknowledgeArticleIds
In debug log i can see the query as :
SELECT Id ,KnowledgeArticleId , title,summary FROM hsinhouse__test_article_type_2__kav WHERE PublishStatus = 'Online' AND language = 'en_US' AND KnowledgeArticleId IN :setknowledgeArticleIds
Its a strange error . Please let me know if you find solution
Thanks