【问题标题】:How do I Record CRM message through CRM SDK web service call?如何通过 CRM SDK Web 服务调用记录 CRM 消息?
【发布时间】:2010-03-22 09:11:24
【问题描述】:

我的任务是通过网站将客户查询直接记录到客户 CRM 系统中。该系统是 Microsoft CRM,我之前使用过支持 Web 服务 SDK。

谁能提供一个示例,通过 SDK 根据简单的联系人字段(如电子邮件、标题、正文和创建日期)存储消息实体记录?

【问题讨论】:

    标签: email sdk dynamics-crm


    【解决方案1】:

    不确定是否已经有一个实体。但是使用 SDK 的过程非常简单。为您想要的实体创建一个 DynamicEntity 实例。然后添加所需的属性。设置实体后,创建一个 TargetCreateDynamic,将其实体属性设置为您的新查询。然后设置一个 CreateRequest,最后在您的 CrmService 实例上调用 Execute。孩子们玩! :)

    它可能看起来像:

    DynamicEntity enquiry = new DynamicEntity();
    enquiry.Name = "crm_Enquiry";  //Use the name not the display name
    StringProperty email = new StringProperty();
    email.Name = "email";
    email.Value = "billg@microsoft.com";
    //other props
    enquiry.Properties = new Property[] {email,...};
    
    TargetCreateDynamic createEnquiry = new TargetCreateDynamic();
    createEnquiry.Entity = enquiry;
    
    CreateRequest create = new CreateRequest();
    create.Target = createEnquiry;
    
    CreateResponse response = (CreateResponse) service.Execute(create);
    //the response will have the id of the new entity if it succeeds
    

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-26
      • 1970-01-01
      • 1970-01-01
      • 2014-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多