zoukankan      html  css  js  c++  java
  • 利用插件新建一条

    // Set up the CRM Service.
    CrmAuthenticationToken token = new CrmAuthenticationToken();
    // You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
    token.AuthenticationType = 0; 
    token.OrganizationName = "AdventureWorksCycle";
     
    CrmService service = new CrmService();
    service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
    service.CrmAuthenticationTokenValue = token;
    service.Credentials = System.Net.CredentialCache.DefaultCredentials;
    
    // Create the request object.
    AddItemCampaignRequest add = new AddItemCampaignRequest();
    
    // Set the properties of the request object.
    add.CampaignId = campaignId;
    add.EntityId = productId;
    add.EntityName = EntityName.product;
    
    // Execute the request.
    AddItemCampaignResponse added = (AddItemCampaignResponse) service.Execute(add);
    
  • 相关阅读:
    接口详解
    可空类型
    初学泛型
    结构和类
    触发器
    学习C#异常处理机制
    静飘移
    《Hashtable(散列表)》 集合
    自定义集合类
    Automation伺服程式無法産生物件
  • 原文地址:https://www.cnblogs.com/hellohongfu/p/1747536.html
Copyright © 2011-2022 走看看