How To Connect Crm 2007 c#
9:51 PM
CRM is a business arrangement that helps organizations enhance promoting, deals, administration and responsibility to its clients to build the productivity of the association, while enhancing the client experience. Presently I need to share a tad bit involvement being developed crm. Acctualy I am Microsoft Dynamic CRM 2011, however for some anticipate still utilize crm 2007. so I need to relocate my code from element crm 2011 to dynamic crm 2007. It's exceptionally defferent code
- config
- Main Program
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Crm.Sdk; using Microsoft.Crm.Sdk.Query; using Microsoft.Crm.SdkTypeProxy; using Microsoft.Crm.Sdk.Metadata; using Microsoft.Crm.SdkTypeProxy.Metadata; using System.IO; using System.Xml.Linq; using System.Xml; using System.Configuration; namespace CRMTutorial { class Program { static void Main(string[] args) { string _crmserviceurl = ConfigurationManager.AppSettings["CRMServerURL"]; string _organization = ConfigurationManager.AppSettings["CRMOrganization"]; string _username = ConfigurationManager.AppSettings["CRMUsername"]; string _password = ConfigurationManager.AppSettings["CRMPassword"]; string _domain = ConfigurationManager.AppSettings["CRMDomain"]; CrmAuthenticationToken mytoken = new CrmAuthenticationToken(); mytoken.AuthenticationType = 0; mytoken.OrganizationName = this._organization; NetworkCredential mycredential = new NetworkCredential(); mycredential.UserName = this._username; mycredential.Password = this._password; mycredential.Domain = this._domain; CrmService service = new CrmService(); service.Url = _crmserviceurl; service.UseDefaultCredentials = false; service.CrmAuthenticationTokenValue = mytoken; service.Credentials = mycredential; /*Your code here call the service crm */ } } }
0 comments