gpt4 book ai didi

dynamics-crm - .net 应用程序如何在 CRM 联系人表中创建记录?

转载 作者:行者123 更新时间:2023-12-02 08:57:51 24 4
gpt4 key购买 nike

我有一个现有的 .net Web 应用程序,可以在常规 SQL Server 数据库中创建客户联系人记录。现在我们正在迁移到 CRM。

我想知道 .NET Web 应用程序与 CRM 服务器通信并创建联系人记录的过程是什么?

谢谢

最佳答案

正如 bjnito 所说,您想查看 SDK ,在开始时特别有帮助的是 Programming Reference

以下是从 a page in the programming ref. 创建联系人的示例

// 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 contact object.
contact contact = new contact();

// Create the properties for the contact object.
contact.firstname = "Jesper";
contact.lastname = "Aaberg";
contact.address1_line1 = "23 Market St.";
contact.address1_city = "Sammamish";
contact.address1_stateorprovince = "MT";
contact.address1_postalcode = "99999";
contact.donotbulkemail = new CrmBoolean();
contact.donotbulkemail.Value = true;

// Create the contact in Microsoft Dynamics CRM.
Guid contactGuid = service.Create(contact);

关于dynamics-crm - .net 应用程序如何在 CRM 联系人表中创建记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3498317/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com