views:

62

answers:

3

Hi

I have an existing .net web application that creates Customer contact record in regular SQL Server Database. Now we are migrating to CRM.

I am wondering from the .NET web application, what is the procedure to talk to CRM server and create a Contact record?

Thanks

A: 

I think you've misunderstood (or I have) - CRM = Contact Relationship Management but doesn't imply a particular server/architecture

eg I write CRM software that uses a SQL Server back-end. If you can provide more information, we may be able to help futher

Basiclife
It sounds like he's using Microsoft Dynamics CRM
SLaks
Note to self check the bl00dy tags
Basiclife
A: 

Recommend reading through the SDK. In particular, look at the articles on the web services and messages available.

benjynito
+2  A: 

As bjynito said, you want to look at the SDK, espescially helpful when starting out will be the Programming Reference

Here is a sample of creating a contact from 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);
BioBuckyBall