04 January 2011

CRM - Get CRM service

To get an instance of the CRM service to send requests to:

private CrmService GetCrmService() {
  return new CrmService() {
    Url = "http://crm/MSCrmServices/2007/CrmService.asmx",
    CrmAuthenticationTokenValue = new CrmAuthenticationToken() {
      AuthenticationType = 0,
      OrganizationName = "EGS_NV"
    },
    Credentials = CredentialCache.DefaultNetworkCredentials,
    PreAuthenticate = true
  };
}

No comments:

Post a Comment