I am trying to retrieve a kbarticle from Dynamics 365 online instance. I use a very simple query provided by SDK sample but it never returns any kbarticle.
Below is the code:
SearchByTitleKbArticleRequest searchByTitleRequest =
new SearchByTitleKbArticleRequest()
{
SubjectId = subjectId, // I have retrieved subjectid earlier.
UseInflection = false,
SearchText = "My Article",
QueryExpression = new QueryExpression()
{
ColumnSet = new ColumnSet(true),
EntityName = "kbarticle" // I've tried knowledgearticle as well.
}
};
var searchByTitleResponse = (SearchByTitleKbArticleResponse)
serviceProxy.Execute(searchByTitleRequest);
// check success
var retrievedArticles = searchByTitleResponse.EntityCollection.Entities;
Console . WriteLine ( " Results of search (titles found):" + retrievedArticles.Count ); // It is always 0
foreach ( var article in retrievedArticles )
Console . WriteLine ( article .Id );
- In the new version of SDK, kbarticle is renamed to knowledgearticle. I have tried using knowledgearticle with no luck.
- The connection to the CRM Online instance is also correct and I am able to run other queries with RetrieveMultiple service.
- The article is published and I have also permissions to access the article.
- I am able to retrieve the same article using REST and also using RetrieveMultiple, so I don't see any issue in the article or my connection.
Can anyone point me to the right direction to make this message working?