【问题标题】:SearchByKeywordsKbArticleRequest in CRM 4.0 SDK C#CRM 4.0 SDK C# 中的 SearchByKeywordsKbArticleRequest
【发布时间】:2011-03-29 19:31:28
【问题描述】:

我正在使用 CRM 4.0 SDK 按从 asp.net 网页上的文本框中输入的关键字查询 kbarticles。我正在使用SearchByKeywordsKbArticleRequest 消息来执行此操作。单个关键字可以正常工作,但如果输入多个单词,则会发生服务器错误。这是我的代码:

CrmAuthenticationToken token = new CrmAuthenticationToken(); 
token.AuthenticationType = 0;
token.OrganizationName = "omitted";

CrmService service = new CrmService();
service.Url = "omitted"
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
//RetrieveMultipleResponse allArticlesResponse = getAllArticles();

SearchByKeywordsKbArticleRequest kb = new SearchByKeywordsKbArticleRequest();
String rawSearchText = keyword;


ColumnSet col = new ColumnSet();
col.Attributes = new string[] { "title", "kbarticleid" };
kb.ColumnSet = col;
kb.SearchText = rawSearchText.Trim();
kb.ReturnDynamicEntities = false;

SearchByKeywordsKbArticleResponse response = 
   (SearchByKeywordsKbArticleResponse)service.Execute(kb);

return response.BusinessEntityCollection;

有什么线索吗?

【问题讨论】:

    标签: c# dynamics-crm-4


    【解决方案1】:

    该方法使用 SQL 全文索引服务,因此您需要在数据库中设置全文索引。通过在 CRM 中启用跟踪,您应该能够获得有关问题所在的更多信息。见:

    http://social.microsoft.com/forums/en-us/crmdevelopment/thread/6A4CE7A3-29F3-4E5A-9A89-8E35D6FD05B9

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      相关资源
      最近更新 更多