Creating a new account using C# on Dynamics CRM
try
{
OrganizationServiceProxy _serviceProxy;
//Grab the organization service url by navigating to
// Settings -> Customizations – > Developer Resources
// The following is from online CRM org
Uri oUri = new Uri(“https://yourcrm.api.crm6.dynamics.com/XRMServices/2011/Organization.svc”);
//** Your client credentials
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = “[email protected]”;
clientCredentials.UserName.Password = “YourPassword!”;
//Create your Organization Service Proxy
_serviceProxy = new OrganizationServiceProxy(
oUri,
null,
clientCredentials,
null);
}
catch (System.Web.Services.Protocols.SoapException ex)
{
MessageBox.Show(ex.Detail.InnerText);
}