Цитата:
Сообщение от
Дмитрий А.А.
Судя по тому, что Вы пишите, это можно сделать подругому.
X++:
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = factory.CreateOrganizationService(context.UserId);
ну и
X++:
ServiceContext svcContext = new ServiceContext(service);
если хотите..
Для плагинов этого обычно достаточно. У меня)