我有一個現有的.net Web應用程序,它在常規SQL Server數據庫中創建客戶聯繫人記錄。現在我們正在遷移到CRM。.net應用程序如何在CRM聯繫人表中創建記錄?
我想知道從.NET Web應用程序,與CRM服務器交談並創建聯繫人記錄的過程是什麼?
感謝
我有一個現有的.net Web應用程序,它在常規SQL Server數據庫中創建客戶聯繫人記錄。現在我們正在遷移到CRM。.net應用程序如何在CRM聯繫人表中創建記錄?
我想知道從.NET Web應用程序,與CRM服務器交談並創建聯繫人記錄的過程是什麼?
感謝
正如bjynito說,你想看看SDK,espescially有用開始外出時將是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);
我認爲你誤解(或我) - CRM =聯繫關係管理,但並不意味着特定的服務器/架構
例如我寫一個使用SQL Server的CRM軟件後端。如果您可以提供更多信息,我們可能會提供幫助。
推薦通過SDK閱讀。具體來說,查看關於可用Web服務和消息的文章。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xrm.Client;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Client.Services;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string connectionString = "Url=https://orgname.crm5.dynamics.com; [email protected]; Password=your password;"; //configure this line
string value = "lllllllll";
AttributeCollection at = new AttributeCollection();
//at.Add("fullname",(String)value);
at.Add("firstname", (String)"LLLL1");
at.Add("lastname", (String)"ffff1");
Entity ent = new Entity();
ent.LogicalName = "contact";
ent.Attributes=at;
CrmConnection connection = CrmConnection.Parse(connectionString);
OrganizationService organisationservice = new OrganizationService(connection);
Guid g = organisationservice.Create(ent);
}}}
聽起來接觸的樣本就像他使用Microsoft Dynamics CRM – SLaks 2010-08-17 00:03:26
注意自我檢查bl00dy標籤 – Basic 2010-08-17 00:34:08