【问题标题】:Create post entity to crm创建帖子实体到 crm
【发布时间】:2016-07-18 09:52:14
【问题描述】:

尝试在 Dynamics CRM 中创建帖子时出现意外错误。下面是代码:

Entity objEntity = new Entity("post");  

objEntity["regardingobjectid"] = IncidentID;
objEntity["text"] = URLs;
objEntity["source"] =  new OptionSetValue(2);
objEntity["type"] = new OptionSetValue(4);

Guid newPostID =  lOrgService.Create(objEntity);

请提出可能是什么问题。

【问题讨论】:

  • 请在您的问题中包含错误
  • 需要澄清一下:是 4.0 还是 2011(适当地重新标记问题)?哪个汇总版本?有什么错误?代码是在插件、自定义 wf 活动还是外部程序中?

标签: c#-4.0 dynamics-crm-2011 crm


【解决方案1】:

可能有很多东西,根据您提交的少量代码很难确定,但我最好的猜测是IncidentID 是一个 GUID,其中regardingobjectid 应该是一个EntityReference .

尝试替换:

objEntity["regardingobjectid"] = IncidentID;

objEntity["regardingobjectid"] = new EntityReference("incident", IncidentID);

【讨论】:

    猜你喜欢
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多