Hi,
I am facing below issue.
scenario, we have multi-tenant environment in our organization, lets assume ORG-A, ORG-B & ORG-C. All are independent environment no direct relationship.
Requirement: I needs to pull data from ORG-B and show it on ORG-A on web resource. I need to connect ORG-B using service account.
Design: I created one custom action on ORG-A and register one post sync step. i am creating new connection with ORG-B CRM and try to pull the record from ORG-B and return back to ORG-A form as XML format.
Issue: while creating connection from ORG-A plug-in to ORG-B using below code and try to pull the record using LINQ. I got below error message.
A proxy type with the name <<ORG-C entityName>> has been defined by another assembly. Current type: <<ORG - C Utility class reference >>, <<ORG-C Workflow assembly>>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a894a5e902227c3d, Existing type: <<ORG - C Utility class reference >>, <<ORG - C Utility class reference >>, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a1c7072af06fb43c
Parameter name: <<ORG-C entityName>>
Below is the code to create Org Service instance to connect ORG-B
private IOrganizationService GetUSDCRMService() { ClientCredentials clientCredentials = new ClientCredentials(); clientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("serviceAcc", "password", "domain"); string orgUrl = GetOrgUrl() + "XRMServices/2011/Organization.svc"; var orgService = new OrganizationServiceProxy(new Uri(orgUrl), null, clientCredentials, null); orgService.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior(Assembly.GetExecutingAssembly())); orgService.EnableProxyTypes(); orgService.Timeout = new TimeSpan(0, 6, 0); return (IOrganizationService)orgService; }
There is no relation with ORG-A & ORG-C as well.
Please suggest where did I made mistake
*This post is locked for comments