Esempio n. 1
0
        //Service connection set up
        internal void CreateServiceConnection()
        {
            string _userName    = ConfigurationManager.AppSettings[LeadConstants.UserName];
            string _password    = ConfigurationManager.AppSettings[LeadConstants.Password];
            string _domain      = ConfigurationManager.AppSettings[LeadConstants.Domain];
            string _url         = ConfigurationManager.AppSettings[LeadConstants.CrmSdkUrl];
            string _metaDataUrl = ConfigurationManager.AppSettings[LeadConstants.MetaDataURL];
            string _org         = ConfigurationManager.AppSettings[LeadConstants.Organisation];

            try
            {
                service         = CrmHelper.CreateConnection(_url, _org, _userName, _password, _domain);
                metaDataService = CrmHelper.CreateMetaDataServiceConnection(_metaDataUrl, _org, _userName, _password, _domain);
            }
            catch (Exception)
            {
                //throw;
            }
        }