CRM 2011 - IORGANİZATİONSERVİCE KULLANIMI (Microsoft CRM OnLine)


public class Factory
        {
        public static IOrganizationService getCRMOnlineService()
        {
            String userName;
            String password;
            String organizationUrl;
            userName = "denem@hotmail.com";
            password = "sifre";
            organizationUrl = "https://test.crm4.dynamics.com/XRMServices/2011/Organization.svc";

         
            Uri OrganizationUri =new Uri(organizationUrl);

            ClientCredentials DeviceCredentials = new ClientCredentials();
            DeviceCredentials.UserName.UserName = "11c8kfpjig2pg5z4mn2t6a6zjq";
            DeviceCredentials.UserName.Password = "IA_ARbUy2qi!H0=fRlOc_/`5";
         
            ClientCredentials credentials = new ClientCredentials();
            credentials.UserName.UserName = userName;
            credentials.UserName.Password = password;
         
            OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, null, credentials, DeviceCredentials);
            serviceProxy.EnableProxyTypes();
 
            IOrganizationService _service = (IOrganizationService)serviceProxy;
         
            return _service;


        }
        }

Hiç yorum yok:

Yorum Gönder