We are trying to use early bound types in a CRM2011 plugin. To enable this it appears we need to either add a ProxyTypesBeavior()
, or call EnableProxyTypes()
. However, both of these properties apply to an OrganizationServiceProxy
class, and do not exist on the IOrganizationService
interface.
So if we are using the following code to get the organization service, how are we meant to obtain a proxy class to set the above properties on?
var serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
var service = serviceFactory.CreateOrganizationService(context.UserId);